aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/debug.c
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:21 -0400
commit2dac754e10a5d41d94d2d2365c0345d4f215a266 (patch)
tree4016ab214b5b51b2be5c40ab2fdc9832c8aca870 /kernel/sched/debug.c
parent18bf2805d9b30cb823d4919b42cd230f59c7ce1f (diff)
sched: Aggregate load contributed by task entities on parenting cfs_rq
For a given task t, we can compute its contribution to load as: task_load(t) = runnable_avg(t) * weight(t) On a parenting cfs_rq we can then aggregate: runnable_load(cfs_rq) = \Sum task_load(t), for all runnable children t Maintain this bottom up, with task entities adding their contributed load to the parenting cfs_rq sum. When a task entity's load changes we add the same delta to the maintained sum. 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.514678907@google.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/debug.c')
-rw-r--r--kernel/sched/debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 4240abce4116..c953a89f94aa 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -94,6 +94,7 @@ static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group
94#ifdef CONFIG_SMP 94#ifdef CONFIG_SMP
95 P(se->avg.runnable_avg_sum); 95 P(se->avg.runnable_avg_sum);
96 P(se->avg.runnable_avg_period); 96 P(se->avg.runnable_avg_period);
97 P(se->avg.load_avg_contrib);
97#endif 98#endif
98#undef PN 99#undef PN
99#undef P 100#undef P
@@ -224,6 +225,8 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
224 cfs_rq->load_contribution); 225 cfs_rq->load_contribution);
225 SEQ_printf(m, " .%-30s: %d\n", "load_tg", 226 SEQ_printf(m, " .%-30s: %d\n", "load_tg",
226 atomic_read(&cfs_rq->tg->load_weight)); 227 atomic_read(&cfs_rq->tg->load_weight));
228 SEQ_printf(m, " .%-30s: %lld\n", "runnable_load_avg",
229 cfs_rq->runnable_load_avg);
227#endif 230#endif
228 231
229 print_cfs_group_stats(m, cpu, cfs_rq->tg); 232 print_cfs_group_stats(m, cpu, cfs_rq->tg);