diff options
author | Ben Segall <bsegall@google.com> | 2012-10-04 06:51:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-10-24 04:27:20 -0400 |
commit | 18bf2805d9b30cb823d4919b42cd230f59c7ce1f (patch) | |
tree | a3a820f6dc5f79ff7569f8fe0d60904e9657fb5a /kernel/sched/debug.c | |
parent | 9d85f21c94f7f7a84d0ba686c58aa6d9da58fdbb (diff) |
sched: Maintain per-rq runnable averages
Since runqueues do not have a corresponding sched_entity we instead embed a
sched_avg structure directly.
Signed-off-by: Ben Segall <bsegall@google.com>
Reviewed-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120823141506.442637130@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/debug.c')
-rw-r--r-- | kernel/sched/debug.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 61f70979153a..4240abce4116 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c | |||
@@ -61,14 +61,20 @@ static unsigned long nsec_low(unsigned long long nsec) | |||
61 | static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group *tg) | 61 | static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group *tg) |
62 | { | 62 | { |
63 | struct sched_entity *se = tg->se[cpu]; | 63 | struct sched_entity *se = tg->se[cpu]; |
64 | if (!se) | ||
65 | return; | ||
66 | 64 | ||
67 | #define P(F) \ | 65 | #define P(F) \ |
68 | SEQ_printf(m, " .%-30s: %lld\n", #F, (long long)F) | 66 | SEQ_printf(m, " .%-30s: %lld\n", #F, (long long)F) |
69 | #define PN(F) \ | 67 | #define PN(F) \ |
70 | SEQ_printf(m, " .%-30s: %lld.%06ld\n", #F, SPLIT_NS((long long)F)) | 68 | SEQ_printf(m, " .%-30s: %lld.%06ld\n", #F, SPLIT_NS((long long)F)) |
71 | 69 | ||
70 | if (!se) { | ||
71 | struct sched_avg *avg = &cpu_rq(cpu)->avg; | ||
72 | P(avg->runnable_avg_sum); | ||
73 | P(avg->runnable_avg_period); | ||
74 | return; | ||
75 | } | ||
76 | |||
77 | |||
72 | PN(se->exec_start); | 78 | PN(se->exec_start); |
73 | PN(se->vruntime); | 79 | PN(se->vruntime); |
74 | PN(se->sum_exec_runtime); | 80 | PN(se->sum_exec_runtime); |