alistair23-linux/arch/ia64
John Hawkes f68f447e83 [PATCH] ia64 cpuset + build_sched_domains() mangles structures
I've already sent this to the maintainers, and this is now being sent to a
larger community audience.  I have fixed a problem with the ia64 version of
build_sched_domains(), but a similar fix still needs to be made to the
generic build_sched_domains() in kernel/sched.c.

The "dynamic sched domains" functionality has recently been merged into
2.6.13-rcN that sees the dynamic declaration of a cpu-exclusive (a.k.a.
"isolated") cpuset and rebuilds the CPU Scheduler sched domains and sched
groups to separate away the CPUs in this cpu-exclusive cpuset from the
remainder of the non-isolated CPUs.  This allows the non-isolated CPUs to
completely ignore the isolated CPUs when doing load-balancing.

Unfortunately, build_sched_domains() expects that a sched domain will
include all the CPUs of each node in the domain, i.e., that no node will
belong in both an isolated cpuset and a non-isolated cpuset.  Declaring a
cpuset that violates this presumption will produce flawed data structures
and will oops the kernel.

To trigger the problem (on a NUMA system with >1 CPUs per node):
   cd /dev/cpuset
   mkdir newcpuset
   cd newcpuset
   echo 0 >cpus
   echo 0 >mems
   echo 1 >cpu_exclusive

I have fixed this shortcoming for ia64 NUMA (with multiple CPUs per node).
A similar shortcoming exists in the generic build_sched_domains() (in
kernel/sched.c) for NUMA, and that needs to be fixed also.  The fix
involves dynamically allocating sched_group_nodes[] and
sched_group_allnodes[] for each invocation of build_sched_domains(), rather
than using global arrays for these structures.  Care must be taken to
remember kmalloc() addresses so that arch_destroy_sched_domains() can
properly kfree() the new dynamic structures.

Signed-off-by: John Hawkes <hawkes@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:39 -07:00
..
configs [IA64] Updated tiger defconfig 2005-08-17 10:24:17 -07:00
dig
hp [IA64] arch/ia64/hp/sim/boot/fw-emu.c: remove egcs workaround 2005-08-24 14:50:37 -07:00
ia32 [IA64] remove use of asm/segment.h 2005-08-24 13:23:30 -07:00
kernel [PATCH] ia64 cpuset + build_sched_domains() mangles structures 2005-09-07 16:57:39 -07:00
lib Pull pending-2.6.14 into release branch 2005-08-29 15:48:23 -07:00
mm [IA64] Rationalise Region Definitions 2005-08-24 15:35:41 -07:00
oprofile
pci Pull asm-segment into release branch 2005-08-29 14:14:40 -07:00
scripts
sn Pull ngam-maule-steiner into release branch 2005-08-29 15:48:51 -07:00
defconfig [PATCH] update all defconfigs for ARCH_DISCONTIGMEM_ENABLE 2005-06-23 09:45:02 -07:00
install.sh
Kconfig [PATCH] x86/x86_64: deferred handling of writes to /proc/irqxx/smp_affinity 2005-09-07 16:57:15 -07:00
Kconfig.debug [PATCH] Kprobes/IA64: arch specific handling 2005-06-23 09:45:22 -07:00
Makefile
module.lds