diff options
Diffstat (limited to 'include/linux/sched.h')
| -rw-r--r-- | include/linux/sched.h | 27 | 
1 files changed, 21 insertions, 6 deletions
| diff --git a/include/linux/sched.h b/include/linux/sched.h index 67a1d86981a9..716ad1d8d95e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -250,16 +250,21 @@ struct prev_cputime {  enum vtime_state {  	/* Task is sleeping or running in a CPU with VTIME inactive: */  	VTIME_INACTIVE = 0, -	/* Task runs in userspace in a CPU with VTIME active: */ -	VTIME_USER, +	/* Task is idle */ +	VTIME_IDLE,  	/* Task runs in kernelspace in a CPU with VTIME active: */  	VTIME_SYS, +	/* Task runs in userspace in a CPU with VTIME active: */ +	VTIME_USER, +	/* Task runs as guests in a CPU with VTIME active: */ +	VTIME_GUEST,  };  struct vtime {  	seqcount_t		seqcount;  	unsigned long long	starttime;  	enum vtime_state	state; +	unsigned int		cpu;  	u64			utime;  	u64			stime;  	u64			gtime; @@ -857,7 +862,7 @@ struct task_struct {  	u64				start_time;  	/* Boot based time in nsecs: */ -	u64				real_start_time; +	u64				start_boottime;  	/* MM fault and swap info: this can arguably be seen as either mm-specific or thread-specific: */  	unsigned long			min_flt; @@ -1054,6 +1059,8 @@ struct task_struct {  #endif  	struct list_head		pi_state_list;  	struct futex_pi_state		*pi_state_cache; +	struct mutex			futex_exit_mutex; +	unsigned int			futex_state;  #endif  #ifdef CONFIG_PERF_EVENTS  	struct perf_event_context	*perf_event_ctxp[perf_nr_task_contexts]; @@ -1203,6 +1210,8 @@ struct task_struct {  #endif /* CONFIG_TRACING */  #ifdef CONFIG_KCOV +	/* See kernel/kcov.c for more details. */ +  	/* Coverage collection mode enabled for this task (0 if disabled): */  	unsigned int			kcov_mode; @@ -1214,6 +1223,12 @@ struct task_struct {  	/* KCOV descriptor wired with this task or NULL: */  	struct kcov			*kcov; + +	/* KCOV common handle for remote coverage collection: */ +	u64				kcov_handle; + +	/* KCOV sequence number: */ +	int				kcov_sequence;  #endif  #ifdef CONFIG_MEMCG @@ -1442,7 +1457,6 @@ extern struct pid *cad_pid;   */  #define PF_IDLE			0x00000002	/* I am an IDLE thread */  #define PF_EXITING		0x00000004	/* Getting shut down */ -#define PF_EXITPIDONE		0x00000008	/* PI exit done on shut down */  #define PF_VCPU			0x00000010	/* I'm a virtual CPU */  #define PF_WQ_WORKER		0x00000020	/* I'm a workqueue worker */  #define PF_FORKNOEXEC		0x00000040	/* Forked but didn't exec */ @@ -1468,6 +1482,7 @@ extern struct pid *cad_pid;  #define PF_NO_SETAFFINITY	0x04000000	/* Userland is not allowed to meddle with cpus_mask */  #define PF_MCE_EARLY		0x08000000      /* Early kill for mce process policy */  #define PF_MEMALLOC_NOCMA	0x10000000	/* All allocation request will have _GFP_MOVABLE cleared */ +#define PF_IO_WORKER		0x20000000	/* Task is an IO worker */  #define PF_FREEZER_SKIP		0x40000000	/* Freezer should not count it as freezable */  #define PF_SUSPEND_TASK		0x80000000      /* This thread called freeze_processes() and should not be frozen */ @@ -1914,11 +1929,11 @@ static inline void rseq_migrate(struct task_struct *t)  /*   * If parent process has a registered restartable sequences area, the - * child inherits. Only applies when forking a process, not a thread. + * child inherits. Unregister rseq for a clone with CLONE_VM set.   */  static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)  { -	if (clone_flags & CLONE_THREAD) { +	if (clone_flags & CLONE_VM) {  		t->rseq = NULL;  		t->rseq_sig = 0;  		t->rseq_event_mask = 0; |