diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 011db2f4c94c..1d19c025f9d2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -998,6 +998,7 @@ struct sched_class { | |||
998 | struct rq *busiest, struct sched_domain *sd, | 998 | struct rq *busiest, struct sched_domain *sd, |
999 | enum cpu_idle_type idle); | 999 | enum cpu_idle_type idle); |
1000 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1000 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
1001 | int (*needs_post_schedule) (struct rq *this_rq); | ||
1001 | void (*post_schedule) (struct rq *this_rq); | 1002 | void (*post_schedule) (struct rq *this_rq); |
1002 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); | 1003 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); |
1003 | 1004 | ||
@@ -1052,6 +1053,10 @@ struct sched_entity { | |||
1052 | u64 last_wakeup; | 1053 | u64 last_wakeup; |
1053 | u64 avg_overlap; | 1054 | u64 avg_overlap; |
1054 | 1055 | ||
1056 | u64 start_runtime; | ||
1057 | u64 avg_wakeup; | ||
1058 | u64 nr_migrations; | ||
1059 | |||
1055 | #ifdef CONFIG_SCHEDSTATS | 1060 | #ifdef CONFIG_SCHEDSTATS |
1056 | u64 wait_start; | 1061 | u64 wait_start; |
1057 | u64 wait_max; | 1062 | u64 wait_max; |
@@ -1067,7 +1072,6 @@ struct sched_entity { | |||
1067 | u64 exec_max; | 1072 | u64 exec_max; |
1068 | u64 slice_max; | 1073 | u64 slice_max; |
1069 | 1074 | ||
1070 | u64 nr_migrations; | ||
1071 | u64 nr_migrations_cold; | 1075 | u64 nr_migrations_cold; |
1072 | u64 nr_failed_migrations_affine; | 1076 | u64 nr_failed_migrations_affine; |
1073 | u64 nr_failed_migrations_running; | 1077 | u64 nr_failed_migrations_running; |
@@ -1164,6 +1168,7 @@ struct task_struct { | |||
1164 | #endif | 1168 | #endif |
1165 | 1169 | ||
1166 | struct list_head tasks; | 1170 | struct list_head tasks; |
1171 | struct plist_node pushable_tasks; | ||
1167 | 1172 | ||
1168 | struct mm_struct *mm, *active_mm; | 1173 | struct mm_struct *mm, *active_mm; |
1169 | 1174 | ||
@@ -1175,13 +1180,14 @@ struct task_struct { | |||
1175 | /* ??? */ | 1180 | /* ??? */ |
1176 | unsigned int personality; | 1181 | unsigned int personality; |
1177 | unsigned did_exec:1; | 1182 | unsigned did_exec:1; |
1183 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an | ||
1184 | * execve */ | ||
1178 | pid_t pid; | 1185 | pid_t pid; |
1179 | pid_t tgid; | 1186 | pid_t tgid; |
1180 | 1187 | ||
1181 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
1182 | /* Canary value for the -fstack-protector gcc feature */ | 1188 | /* Canary value for the -fstack-protector gcc feature */ |
1183 | unsigned long stack_canary; | 1189 | unsigned long stack_canary; |
1184 | #endif | 1190 | |
1185 | /* | 1191 | /* |
1186 | * pointers to (original) parent process, youngest child, younger sibling, | 1192 | * pointers to (original) parent process, youngest child, younger sibling, |
1187 | * older sibling, respectively. (p->father can be replaced with | 1193 | * older sibling, respectively. (p->father can be replaced with |
@@ -1673,6 +1679,16 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1673 | return set_cpus_allowed_ptr(p, &new_mask); | 1679 | return set_cpus_allowed_ptr(p, &new_mask); |
1674 | } | 1680 | } |
1675 | 1681 | ||
1682 | /* | ||
1683 | * Architectures can set this to 1 if they have specified | ||
1684 | * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig, | ||
1685 | * but then during bootup it turns out that sched_clock() | ||
1686 | * is reliable after all: | ||
1687 | */ | ||
1688 | #ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | ||
1689 | extern int sched_clock_stable; | ||
1690 | #endif | ||
1691 | |||
1676 | extern unsigned long long sched_clock(void); | 1692 | extern unsigned long long sched_clock(void); |
1677 | 1693 | ||
1678 | extern void sched_clock_init(void); | 1694 | extern void sched_clock_init(void); |
@@ -2090,6 +2106,19 @@ static inline int object_is_on_stack(void *obj) | |||
2090 | 2106 | ||
2091 | extern void thread_info_cache_init(void); | 2107 | extern void thread_info_cache_init(void); |
2092 | 2108 | ||
2109 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
2110 | static inline unsigned long stack_not_used(struct task_struct *p) | ||
2111 | { | ||
2112 | unsigned long *n = end_of_stack(p); | ||
2113 | |||
2114 | do { /* Skip over canary */ | ||
2115 | n++; | ||
2116 | } while (!*n); | ||
2117 | |||
2118 | return (unsigned long)n - (unsigned long)end_of_stack(p); | ||
2119 | } | ||
2120 | #endif | ||
2121 | |||
2093 | /* set thread flags in other task's structures | 2122 | /* set thread flags in other task's structures |
2094 | * - see asm/thread_info.h for TIF_xxxx flags available | 2123 | * - see asm/thread_info.h for TIF_xxxx flags available |
2095 | */ | 2124 | */ |