]> git.hungrycats.org Git - linux/commit
[PATCH] sched: fix setup races
authorAndrew Morton <akpm@osdl.org>
Mon, 10 May 2004 06:27:37 +0000 (23:27 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 10 May 2004 06:27:37 +0000 (23:27 -0700)
commit80b1925658bab860f39873a95817714ae20c5e34
tree1d92db48825ba8f162e4b2e87710c63d738cd180
parent17d66773eec2fcddf99d6778785e51f974c9d253
[PATCH] sched: fix setup races

From: Nick Piggin <nickpiggin@yahoo.com.au>

De-racify the sched domain setup code.  This involves creating a dummy
"init" domain during sched_init (which is called early).

When topology information becomes available, the sched domains are then
built and attached.  The attach mechanism is asynchronous and uses the
migration threads, which perform the switch with interrupts off.  This is a
quiescent state, so domains can still be lockless on the read side.  It
also allows us to change the domains at runtime without much more work.
This is something SGI is interested in to elegantly do soft partitioning of
their systems without having to use hard cpu affinities (which cause
balancing problems of their own).

The current setup code also has a race somewhere because it is unable to
boot on a 384 CPU system.

From: Anton Blanchard <anton@samba.org>

   This is basically a mindless ppc64 merge of the x86 changes to sched
   domain init code.

   Actually if I produce a sibling_map[] then the x86 code and the ppc64
   will be identical.  Maybe we can merge it.
arch/i386/kernel/smpboot.c
arch/ppc64/kernel/smp.c
include/linux/sched.h
kernel/sched.c