Re: [PATCH 1/5] x86: Limit the number of processor bootup messages

From: Ingo Molnar
Date: Thu Nov 26 2009 - 04:16:51 EST



* Mike Travis <travis@xxxxxxx> wrote:

> +++ linux/arch/x86/kernel/smpboot.c
> @@ -671,6 +671,27 @@
> complete(&c_idle->done);
> }
>
> +/* reduce the number of lines printed when booting a large cpu count system */
> +static void __cpuinit announce_cpu(int cpu, int apicid)
> +{
> + if (system_state == SYSTEM_BOOTING) {
> +#ifdef CONFIG_NUMA
> + static int current_node = -1;
> + int node = cpu_to_node(cpu);
> +
> + if (node != current_node) {
> + if (current_node > (-1))
> + pr_cont(" Ok.\n");
> + current_node = node;
> + pr_info("Booting Node %3d, Processors ", node);
> + }
> + pr_cont(" #%d%s", cpu, cpu == (nr_cpu_ids - 1) ? " Ok.\n" : "");
> + return;
> +#endif
> + }

That's pretty ugly. (the #ifdef is at the wrong nesting level to begin
with)

Also, cannot we print out the same thing with no #ifdef variances? Users
of UP systems wont be confused by a 'Node 0, CPU 0' message and in 5
years most x86 people will be running NUMA systems.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/