diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index dc7e592c473a..42036ffe6b00 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -506,6 +506,10 @@ struct signal_struct { | |||
506 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 506 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
507 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; | 507 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; |
508 | unsigned long inblock, oublock, cinblock, coublock; | 508 | unsigned long inblock, oublock, cinblock, coublock; |
509 | #ifdef CONFIG_TASK_XACCT | ||
510 | u64 rchar, wchar, syscr, syscw; | ||
511 | #endif | ||
512 | struct task_io_accounting ioac; | ||
509 | 513 | ||
510 | /* | 514 | /* |
511 | * Cumulative ns of scheduled CPU time for dead threads in the | 515 | * Cumulative ns of scheduled CPU time for dead threads in the |
@@ -668,6 +672,10 @@ struct task_delay_info { | |||
668 | /* io operations performed */ | 672 | /* io operations performed */ |
669 | u32 swapin_count; /* total count of the number of swapin block */ | 673 | u32 swapin_count; /* total count of the number of swapin block */ |
670 | /* io operations performed */ | 674 | /* io operations performed */ |
675 | |||
676 | struct timespec freepages_start, freepages_end; | ||
677 | u64 freepages_delay; /* wait for memory reclaim */ | ||
678 | u32 freepages_count; /* total count of memory reclaim */ | ||
671 | }; | 679 | }; |
672 | #endif /* CONFIG_TASK_DELAY_ACCT */ | 680 | #endif /* CONFIG_TASK_DELAY_ACCT */ |
673 | 681 | ||
@@ -1257,7 +1265,7 @@ struct task_struct { | |||
1257 | #if defined(CONFIG_TASK_XACCT) | 1265 | #if defined(CONFIG_TASK_XACCT) |
1258 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1266 | u64 acct_rss_mem1; /* accumulated rss usage */ |
1259 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ | 1267 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ |
1260 | cputime_t acct_stimexpd;/* stime since last update */ | 1268 | cputime_t acct_timexpd; /* stime + utime since last update */ |
1261 | #endif | 1269 | #endif |
1262 | #ifdef CONFIG_CPUSETS | 1270 | #ifdef CONFIG_CPUSETS |
1263 | nodemask_t mems_allowed; | 1271 | nodemask_t mems_allowed; |
@@ -1496,7 +1504,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
1496 | #define PF_KSWAPD 0x00040000 /* I am kswapd */ | 1504 | #define PF_KSWAPD 0x00040000 /* I am kswapd */ |
1497 | #define PF_SWAPOFF 0x00080000 /* I am in swapoff */ | 1505 | #define PF_SWAPOFF 0x00080000 /* I am in swapoff */ |
1498 | #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ | 1506 | #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ |
1499 | #define PF_BORROWED_MM 0x00200000 /* I am a kthread doing use_mm */ | 1507 | #define PF_KTHREAD 0x00200000 /* I am a kernel thread */ |
1500 | #define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ | 1508 | #define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ |
1501 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ | 1509 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ |
1502 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 1510 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
@@ -1715,19 +1723,13 @@ extern struct pid_namespace init_pid_ns; | |||
1715 | * finds a task by its pid in the specified namespace | 1723 | * finds a task by its pid in the specified namespace |
1716 | * find_task_by_vpid(): | 1724 | * find_task_by_vpid(): |
1717 | * finds a task by its virtual pid | 1725 | * finds a task by its virtual pid |
1718 | * find_task_by_pid(): | ||
1719 | * finds a task by its global pid | ||
1720 | * | 1726 | * |
1721 | * see also find_pid() etc in include/linux/pid.h | 1727 | * see also find_vpid() etc in include/linux/pid.h |
1722 | */ | 1728 | */ |
1723 | 1729 | ||
1724 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, | 1730 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, |
1725 | struct pid_namespace *ns); | 1731 | struct pid_namespace *ns); |
1726 | 1732 | ||
1727 | static inline struct task_struct *__deprecated find_task_by_pid(pid_t nr) | ||
1728 | { | ||
1729 | return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns); | ||
1730 | } | ||
1731 | extern struct task_struct *find_task_by_vpid(pid_t nr); | 1733 | extern struct task_struct *find_task_by_vpid(pid_t nr); |
1732 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, | 1734 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, |
1733 | struct pid_namespace *ns); | 1735 | struct pid_namespace *ns); |
@@ -1800,7 +1802,6 @@ extern void force_sig(int, struct task_struct *); | |||
1800 | extern void force_sig_specific(int, struct task_struct *); | 1802 | extern void force_sig_specific(int, struct task_struct *); |
1801 | extern int send_sig(int, struct task_struct *, int); | 1803 | extern int send_sig(int, struct task_struct *, int); |
1802 | extern void zap_other_threads(struct task_struct *p); | 1804 | extern void zap_other_threads(struct task_struct *p); |
1803 | extern int kill_proc(pid_t, int, int); | ||
1804 | extern struct sigqueue *sigqueue_alloc(void); | 1805 | extern struct sigqueue *sigqueue_alloc(void); |
1805 | extern void sigqueue_free(struct sigqueue *); | 1806 | extern void sigqueue_free(struct sigqueue *); |
1806 | extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); | 1807 | extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); |
@@ -1983,6 +1984,13 @@ static inline unsigned long *end_of_stack(struct task_struct *p) | |||
1983 | 1984 | ||
1984 | #endif | 1985 | #endif |
1985 | 1986 | ||
1987 | static inline int object_is_on_stack(void *obj) | ||
1988 | { | ||
1989 | void *stack = task_stack_page(current); | ||
1990 | |||
1991 | return (obj >= stack) && (obj < (stack + THREAD_SIZE)); | ||
1992 | } | ||
1993 | |||
1986 | extern void thread_info_cache_init(void); | 1994 | extern void thread_info_cache_init(void); |
1987 | 1995 | ||
1988 | /* set thread flags in other task's structures | 1996 | /* set thread flags in other task's structures |
@@ -2047,9 +2055,6 @@ static inline int signal_pending_state(long state, struct task_struct *p) | |||
2047 | if (!signal_pending(p)) | 2055 | if (!signal_pending(p)) |
2048 | return 0; | 2056 | return 0; |
2049 | 2057 | ||
2050 | if (state & (__TASK_STOPPED | __TASK_TRACED)) | ||
2051 | return 0; | ||
2052 | |||
2053 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | 2058 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); |
2054 | } | 2059 | } |
2055 | 2060 | ||