Skip to contentSkip to conversation

don't print migration cost when only 1 CPU

PATCH Dave Jones 1 participant 1 message Aug 1, 2006

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

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

kernel/sched.c renamed from kernel/sched.c~ +8 -6
@@ -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)
Signature · 1 line
http://www.codemonkey.org.uk