summaryrefslogtreecommitdiffstats
path: root/kernel/sched/debug.c
diff options
context:
space:
mode:
authorBen Segall <bsegall@google.com>2012-10-04 12:51:20 +0200
committerIngo Molnar <mingo@kernel.org>2012-10-24 10:27:20 +0200
commit18bf2805d9b30cb823d4919b42cd230f59c7ce1f (patch)
treea3a820f6dc5f79ff7569f8fe0d60904e9657fb5a /kernel/sched/debug.c
parent9d85f21c94f7f7a84d0ba686c58aa6d9da58fdbb (diff)
downloadlinux-stable-18bf2805d9b30cb823d4919b42cd230f59c7ce1f.tar.gz
linux-stable-18bf2805d9b30cb823d4919b42cd230f59c7ce1f.tar.bz2
linux-stable-18bf2805d9b30cb823d4919b42cd230f59c7ce1f.zip
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.c10
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)
static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group *tg)
{
struct sched_entity *se = tg->se[cpu];
- if (!se)
- return;
#define P(F) \
SEQ_printf(m, " .%-30s: %lld\n", #F, (long long)F)
#define PN(F) \
SEQ_printf(m, " .%-30s: %lld.%06ld\n", #F, SPLIT_NS((long long)F))
+ if (!se) {
+ struct sched_avg *avg = &cpu_rq(cpu)->avg;
+ P(avg->runnable_avg_sum);
+ P(avg->runnable_avg_period);
+ return;
+ }
+
+
PN(se->exec_start);
PN(se->vruntime);
PN(se->sum_exec_runtime);