aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorPaul Turner <pjt@google.com>2012-10-04 07:18:30 -0400
committerIngo Molnar <mingo@kernel.org>2012-10-24 04:27:24 -0400
commitc566e8e9e44b72b53091da20e2dedefc730f2ee2 (patch)
tree3e86db8843021c36b41362063183d1135fda63db /kernel/sched/sched.h
parentaff3e498844441fa71c5ee1bbc470e1dff9548d9 (diff)
sched: Aggregate total task_group load
Maintain a global running sum of the average load seen on each cfs_rq belonging to each task group so that it may be used in calculating an appropriate shares:weight distribution. Signed-off-by: Paul Turner <pjt@google.com> Reviewed-by: Ben Segall <bsegall@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20120823141506.792901086@google.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 30236ab4edc0..924a99094888 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -112,6 +112,7 @@ struct task_group {
112 unsigned long shares; 112 unsigned long shares;
113 113
114 atomic_t load_weight; 114 atomic_t load_weight;
115 atomic64_t load_avg;
115#endif 116#endif
116 117
117#ifdef CONFIG_RT_GROUP_SCHED 118#ifdef CONFIG_RT_GROUP_SCHED
@@ -232,6 +233,9 @@ struct cfs_rq {
232 u64 runnable_load_avg, blocked_load_avg; 233 u64 runnable_load_avg, blocked_load_avg;
233 atomic64_t decay_counter, removed_load; 234 atomic64_t decay_counter, removed_load;
234 u64 last_decay; 235 u64 last_decay;
236#ifdef CONFIG_FAIR_GROUP_SCHED
237 u64 tg_load_contrib;
238#endif
235#endif 239#endif
236#ifdef CONFIG_FAIR_GROUP_SCHED 240#ifdef CONFIG_FAIR_GROUP_SCHED
237 struct rq *rq; /* cpu runqueue to which this cfs_rq is attached */ 241 struct rq *rq; /* cpu runqueue to which this cfs_rq is attached */