Skip to contentSkip to conversation

sched: only print migration_cost once per boot

PATCH New Chuck Ebbert 1 participant 1 message Feb 3, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: only print migration_cost once per boot

migration_cost prints after every CPU hotplug event. Make it print only once at boot.

kernel/sched.c +8 -6
@@ -5699,13 +5699,15 @@ static void calibrate_migration_costs(co
 			-1
 #endif
 		);
-	printk("migration_cost=");
-	for (distance = 0; distance <= max_distance; distance++) {
-		if (distance)
-			printk(",");
-		printk("%ld", (long)migration_cost[distance] / 1000);
+	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);
+		}
+		printk("\n");
 	}
-	printk("\n");
 	j1 = jiffies;
 	if (migration_debug)
 		printk("migration: %ld seconds\n", (j1-j0)/HZ);
Signature · 1 line
Chuck