Skip to content

Commit

Permalink
[PATCH] sched: don't print migration cost when only 1 CPU
Browse files Browse the repository at this point in the history
If only a single CPU is present, printing this doesn't make much sense.

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Dave Jones authored and Linus Torvalds committed Oct 3, 2006
1 parent a616058 commit 7473264
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7473264

Please sign in to comment.