aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index a419b65770d6..f74d4cc3a3e5 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -176,6 +176,14 @@ extern void get_iowait_load(unsigned long *nr_waiters, unsigned long *load);
176extern void calc_global_load(unsigned long ticks); 176extern void calc_global_load(unsigned long ticks);
177extern void update_cpu_load_nohz(void); 177extern void update_cpu_load_nohz(void);
178 178
179/* Notifier for when a task gets migrated to a new CPU */
180struct task_migration_notifier {
181 struct task_struct *task;
182 int from_cpu;
183 int to_cpu;
184};
185extern void register_task_migration_notifier(struct notifier_block *n);
186
179extern unsigned long get_parent_ip(unsigned long addr); 187extern unsigned long get_parent_ip(unsigned long addr);
180 188
181extern void dump_cpu_task(int cpu); 189extern void dump_cpu_task(int cpu);
@@ -329,6 +337,8 @@ extern asmlinkage void schedule_tail(struct task_struct *prev);
329extern void init_idle(struct task_struct *idle, int cpu); 337extern void init_idle(struct task_struct *idle, int cpu);
330extern void init_idle_bootup_task(struct task_struct *idle); 338extern void init_idle_bootup_task(struct task_struct *idle);
331 339
340extern cpumask_var_t cpu_isolated_map;
341
332extern int runqueue_is_locked(int cpu); 342extern int runqueue_is_locked(int cpu);
333 343
334#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) 344#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
@@ -1115,15 +1125,28 @@ struct load_weight {
1115}; 1125};
1116 1126
1117struct sched_avg { 1127struct sched_avg {
1128 u64 last_runnable_update;
1129 s64 decay_count;
1130 /*
1131 * utilization_avg_contrib describes the amount of time that a
1132 * sched_entity is running on a CPU. It is based on running_avg_sum
1133 * and is scaled in the range [0..SCHED_LOAD_SCALE].
1134 * load_avg_contrib described the amount of time that a sched_entity
1135 * is runnable on a rq. It is based on both runnable_avg_sum and the
1136 * weight of the task.
1137 */
1138 unsigned long load_avg_contrib, utilization_avg_contrib;
1118 /* 1139 /*
1119 * These sums represent an infinite geometric series and so are bound 1140 * These sums represent an infinite geometric series and so are bound
1120 * above by 1024/(1-y). Thus we only need a u32 to store them for all 1141 * above by 1024/(1-y). Thus we only need a u32 to store them for all
1121 * choices of y < 1-2^(-32)*1024. 1142 * choices of y < 1-2^(-32)*1024.
1143 * running_avg_sum reflects the time that the sched_entity is
1144 * effectively running on the CPU.
1145 * runnable_avg_sum represents the amount of time a sched_entity is on
1146 * a runqueue which includes the running time that is monitored by
1147 * running_avg_sum.
1122 */ 1148 */
1123 u32 runnable_avg_sum, runnable_avg_period; 1149 u32 runnable_avg_sum, avg_period, running_avg_sum;
1124 u64 last_runnable_update;
1125 s64 decay_count;
1126 unsigned long load_avg_contrib;
1127}; 1150};
1128 1151
1129#ifdef CONFIG_SCHEDSTATS 1152#ifdef CONFIG_SCHEDSTATS