From: Dave Jones Date: Tue, 3 Oct 2006 08:14:07 +0000 (-0700) Subject: [PATCH] sched: don't print migration cost when only 1 CPU X-Git-Tag: v2.6.19-rc1~345 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74732646431a1bb7e23e6b564127a8881cfef900;p=linux-2.6 [PATCH] sched: don't print migration cost when only 1 CPU If only a single CPU is present, printing this doesn't make much sense. Signed-off-by: Dave Jones Acked-by: Ingo Molnar Acked-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/sched.c b/kernel/sched.c index 6b956bd9b4..6d7bf55ec3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5977,13 +5977,15 @@ static void calibrate_migration_costs(const cpumask_t *cpu_map) #endif ); if (system_state == SYSTEM_BOOTING) { - printk("migration_cost="); - for (distance = 0; distance <= max_distance; distance++) { - if (distance) - printk(","); - printk("%ld", (long)migration_cost[distance] / 1000); + if (num_online_cpus() > 1) { + printk("migration_cost="); + for (distance = 0; distance <= max_distance; distance++) { + if (distance) + printk(","); + printk("%ld", (long)migration_cost[distance] / 1000); + } + printk("\n"); } - printk("\n"); } j1 = jiffies; if (migration_debug)