diff options
author | Paul Turner <pjt@google.com> | 2012-10-04 07:18:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-10-24 04:27:21 -0400 |
commit | 2dac754e10a5d41d94d2d2365c0345d4f215a266 (patch) | |
tree | 4016ab214b5b51b2be5c40ab2fdc9832c8aca870 /include/linux/sched.h | |
parent | 18bf2805d9b30cb823d4919b42cd230f59c7ce1f (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 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 418fc6d8a4da..81d8b1ba4100 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1103,6 +1103,7 @@ struct sched_avg { | |||
1103 | */ | 1103 | */ |
1104 | u32 runnable_avg_sum, runnable_avg_period; | 1104 | u32 runnable_avg_sum, runnable_avg_period; |
1105 | u64 last_runnable_update; | 1105 | u64 last_runnable_update; |
1106 | unsigned long load_avg_contrib; | ||
1106 | }; | 1107 | }; |
1107 | 1108 | ||
1108 | #ifdef CONFIG_SCHEDSTATS | 1109 | #ifdef CONFIG_SCHEDSTATS |