public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/debug: fix idle balance factors aren't printed out if w/o CONFIG_SCHEDSTATS
@ 2016-05-03  4:38 Wanpeng Li
  2016-05-05  9:41 ` [tip:sched/core] sched/debug: Print out idle balance values even on !CONFIG_SCHEDSTATS kernels tip-bot for Wanpeng Li
  0 siblings, 1 reply; 2+ messages in thread
From: Wanpeng Li @ 2016-05-03  4:38 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Wanpeng Li

From: Wanpeng Li <wanpeng.li@hotmail.com>

max_idle_balance_cost and avg_idle which used to capture short idle 
are not associated with schedstats, however, the information of these
two factors are't printed out if w/o CONFIG_SCHEDSTATS. 

This patch fix it by moving max_idle_balance_cost and avg_idle print 
out of CONFIG_SCHEDSTATS.

Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
---
 kernel/sched/debug.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 4fbc3bd..cf905f6 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -626,15 +626,16 @@ do {									\
 #undef P
 #undef PN
 
-#ifdef CONFIG_SCHEDSTATS
-#define P(n) SEQ_printf(m, "  .%-30s: %d\n", #n, rq->n);
-#define P64(n) SEQ_printf(m, "  .%-30s: %Ld\n", #n, rq->n);
-
 #ifdef CONFIG_SMP
+#define P64(n) SEQ_printf(m, "  .%-30s: %Ld\n", #n, rq->n);
 	P64(avg_idle);
 	P64(max_idle_balance_cost);
+#undef P64
 #endif
 
+#ifdef CONFIG_SCHEDSTATS
+#define P(n) SEQ_printf(m, "  .%-30s: %d\n", #n, rq->n);
+
 	if (schedstat_enabled()) {
 		P(yld_count);
 		P(sched_count);
@@ -644,7 +645,6 @@ do {									\
 	}
 
 #undef P
-#undef P64
 #endif
 	spin_lock_irqsave(&sched_debug_lock, flags);
 	print_cfs_stats(m, cpu);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-05  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03  4:38 [PATCH] sched/debug: fix idle balance factors aren't printed out if w/o CONFIG_SCHEDSTATS Wanpeng Li
2016-05-05  9:41 ` [tip:sched/core] sched/debug: Print out idle balance values even on !CONFIG_SCHEDSTATS kernels tip-bot for Wanpeng Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox