aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2009-11-17 19:22:15 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-26 04:17:30 -0500
commitf6630114d9198aa959ac95c131334c020038f253 (patch)
tree601e0f12aa8f599c40c0425ed6f2c4523fe2edbe /kernel
parent93335a21557e80f6a99bc2812c634e488139043c (diff)
sched: Limit the number of scheduler debug messages
Remove the verbose scheduler debug messages unless kernel parameter "sched_debug" set. /proc/sched_debug unchanged. Signed-off-by: Mike Travis <travis@sgi.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Roland Dreier <rdreier@cisco.com> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Tejun Heo <tj@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Cc: David Rientjes <rientjes@google.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Cc: Jack Steiner <steiner@sgi.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20091118002221.489305000@alcatraz.americas.sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index a57c6aee6d4a..48ff66a6892d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7720,6 +7720,16 @@ early_initcall(migration_init);
7720 7720
7721#ifdef CONFIG_SCHED_DEBUG 7721#ifdef CONFIG_SCHED_DEBUG
7722 7722
7723static __read_mostly int sched_domain_debug_enabled;
7724
7725static int __init sched_domain_debug_setup(char *str)
7726{
7727 sched_domain_debug_enabled = 1;
7728
7729 return 0;
7730}
7731early_param("sched_debug", sched_domain_debug_setup);
7732
7723static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, 7733static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
7724 struct cpumask *groupmask) 7734 struct cpumask *groupmask)
7725{ 7735{
@@ -7806,6 +7816,9 @@ static void sched_domain_debug(struct sched_domain *sd, int cpu)
7806 cpumask_var_t groupmask; 7816 cpumask_var_t groupmask;
7807 int level = 0; 7817 int level = 0;
7808 7818
7819 if (!sched_domain_debug_enabled)
7820 return;
7821
7809 if (!sd) { 7822 if (!sd) {
7810 printk(KERN_DEBUG "CPU%d attaching NULL sched-domain.\n", cpu); 7823 printk(KERN_DEBUG "CPU%d attaching NULL sched-domain.\n", cpu);
7811 return; 7824 return;