Re: SMP Panic caused by [PATCH] sched: consolidate sched domains

From: William Lee Irwin III
Date: Sun Aug 29 2004 - 12:09:42 EST


On Sunday, August 29, 2004 6:39 am, James Bottomley wrote:
>> This patch causes an immediate panic when the secondary processors come
>> on-line because sd->next is NULL.
>> The fix is to use cpu_possible_map instead of nodemask (which expands,
>> probably erroneously, to cpu_online_map in the non-numa case).
>> Any use of cpu_online_map in initialisation code is almost invariably
>> wrong, so please don't do it in future.
>> I know I'm sounding like a broken record, but it would be a lot easier
>> to spot mistakes like this immediately if every arch used the hotplug
>> paths to bring SMP up.
>> Anyway, the attached fixes our panic.

On Sun, Aug 29, 2004 at 09:48:06AM -0700, Jesse Barnes wrote:
> But I think this breaks what the code is supposed to do. You're
> right that we shouldn't use cpu_online_map, but we should leave the
> nodemask in there and fix the code that sets it in the non-NUMA case
> instead.

Index: wait-2.6.9-rc1-mm1/include/asm-generic/topology.h
===================================================================
--- wait-2.6.9-rc1-mm1.orig/include/asm-generic/topology.h 2004-08-24 00:01:54.000000000 -0700
+++ wait-2.6.9-rc1-mm1/include/asm-generic/topology.h 2004-08-29 10:02:01.513753008 -0700
@@ -36,7 +36,7 @@
#define parent_node(node) (0)
#endif
#ifndef node_to_cpumask
-#define node_to_cpumask(node) (cpu_online_map)
+#define node_to_cpumask(node) (cpu_possible_map)
#endif
#ifndef node_to_first_cpu
#define node_to_first_cpu(node) (0)
-
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/