public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* SMP Panic caused by [PATCH] sched: consolidate sched domains
@ 2004-08-29 13:39 James Bottomley
  2004-08-29 16:48 ` Jesse Barnes
  0 siblings, 1 reply; 16+ messages in thread
From: James Bottomley @ 2004-08-29 13:39 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds, Matthew Dobson, Nick Piggin; +Cc: Linux Kernel

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.

James

===== kernel/sched.c 1.329 vs edited =====
--- 1.329/kernel/sched.c	2004-08-24 02:08:09 -07:00
+++ edited/kernel/sched.c	2004-08-29 06:17:26 -07:00
@@ -3756,7 +3756,7 @@
 		sd = &per_cpu(phys_domains, i);
 		group = cpu_to_phys_group(i);
 		*sd = SD_CPU_INIT;
-		sd->span = nodemask;
+		sd->span = cpu_possible_map;
 		sd->parent = p;
 		sd->groups = &sched_group_phys[group];
 
@@ -3790,7 +3790,7 @@
 		if (cpus_empty(nodemask))
 			continue;
 
-		init_sched_build_groups(sched_group_phys, nodemask,
+		init_sched_build_groups(sched_group_phys, cpu_possible_map,
 						&cpu_to_phys_group);
 	}
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-08-30 19:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-29 13:39 SMP Panic caused by [PATCH] sched: consolidate sched domains James Bottomley
2004-08-29 16:48 ` Jesse Barnes
2004-08-29 16:58   ` James Bottomley
2004-08-29 17:07     ` Jesse Barnes
2004-08-29 17:16       ` James Bottomley
2004-08-30 19:11         ` Matthew Dobson
2004-08-29 17:24       ` James Bottomley
2004-08-29 17:48         ` Nathan Lynch
2004-08-29 22:59           ` James Bottomley
2004-08-29 17:03   ` William Lee Irwin III
2004-08-29 17:09     ` James Bottomley
2004-08-29 17:22       ` William Lee Irwin III
2004-08-29 17:29         ` William Lee Irwin III
2004-08-29 17:40           ` William Lee Irwin III
2004-08-29 17:50             ` William Lee Irwin III
2004-08-29 23:13               ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox