sched/debug: Hide printk() by default
authorPeter Zijlstra <[email protected]>
Tue, 20 Sep 2016 09:05:31 +0000 (11:05 +0200)
committerIngo Molnar <[email protected]>
Thu, 22 Sep 2016 13:20:25 +0000 (15:20 +0200)
Dietmar accidentally added an unconditional sched domain printk. Hide
it behind the normal sched_debug flag.

Reported-by: Christian Borntraeger <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Christian Borntraeger <[email protected]>
Cc: Dietmar Eggemann <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Fixes: cd92bfd3b8cb ("sched/core: Store maximum per-CPU capacity in root domain")
[ Fixed !SCHED_DEBUG build failure. ]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/core.c

index d7babcc7cb76e8311399de29b9db708ed5c2dbb9..8bae0cd09e9eb3eeb1ab4659ca9ad56e536ddf7a 100644 (file)
@@ -5739,6 +5739,8 @@ static void sched_domain_debug(struct sched_domain *sd, int cpu)
        }
 }
 #else /* !CONFIG_SCHED_DEBUG */
+
+# define sched_debug_enabled 0
 # define sched_domain_debug(sd, cpu) do { } while (0)
 static inline bool sched_debug(void)
 {
@@ -7006,7 +7008,7 @@ static int build_sched_domains(const struct cpumask *cpu_map,
        }
        rcu_read_unlock();
 
-       if (rq) {
+       if (rq && sched_debug_enabled) {
                pr_info("span: %*pbl (max cpu_capacity = %lu)\n",
                        cpumask_pr_args(cpu_map), rq->rd->max_cpu_capacity);
        }