aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorWanpeng Li <wanpeng.li@hotmail.com>2016-05-03 00:38:25 -0400
committerIngo Molnar <mingo@kernel.org>2016-05-05 03:41:09 -0400
commitdb6ea2fb094fb3a6afc36d3e4229bc162638ad24 (patch)
tree327c9321379b4b205f8d528c31a1833cabbf0f0d /kernel/sched
parent7b20b916e953cabef569541f991a0a583bc344cb (diff)
sched/debug: Print out idle balance values even on !CONFIG_SCHEDSTATS kernels
The max_idle_balance_cost and avg_idle values which are tracked and ar used to capture short idle incidents, are not associated with schedstats, however the information of these two values isn't printed out on !CONFIG_SCHEDSTATS kernels. Fix this by moving the value printout out of the CONFIG_SCHEDSTATS section. Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1462250305-4523-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/debug.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 4fbc3bd5ff60..cf905f655ba1 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -626,15 +626,16 @@ do { \
626#undef P 626#undef P
627#undef PN 627#undef PN
628 628
629#ifdef CONFIG_SCHEDSTATS
630#define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n);
631#define P64(n) SEQ_printf(m, " .%-30s: %Ld\n", #n, rq->n);
632
633#ifdef CONFIG_SMP 629#ifdef CONFIG_SMP
630#define P64(n) SEQ_printf(m, " .%-30s: %Ld\n", #n, rq->n);
634 P64(avg_idle); 631 P64(avg_idle);
635 P64(max_idle_balance_cost); 632 P64(max_idle_balance_cost);
633#undef P64
636#endif 634#endif
637 635
636#ifdef CONFIG_SCHEDSTATS
637#define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n);
638
638 if (schedstat_enabled()) { 639 if (schedstat_enabled()) {
639 P(yld_count); 640 P(yld_count);
640 P(sched_count); 641 P(sched_count);
@@ -644,7 +645,6 @@ do { \
644 } 645 }
645 646
646#undef P 647#undef P
647#undef P64
648#endif 648#endif
649 spin_lock_irqsave(&sched_debug_lock, flags); 649 spin_lock_irqsave(&sched_debug_lock, flags);
650 print_cfs_stats(m, cpu); 650 print_cfs_stats(m, cpu);