public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* don't print migration cost when only 1 CPU
@ 2006-08-01 18:20 Dave Jones
  0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2006-08-01 18:20 UTC (permalink / raw)
  To: Linux Kernel

If only a single CPU is present, printing this doesn't make much sense.

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6/kernel/sched.c~	2006-04-24 19:30:13.000000000 -0400
+++ linux-2.6/kernel/sched.c	2006-04-24 19:32:49.000000000 -0400
@@ -5518,13 +5518,15 @@ static void calibrate_migration_costs(co
 #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)

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-01 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-01 18:20 don't print migration cost when only 1 CPU Dave Jones

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