I've already sent this to the maintainers, and this is now being sent to alarger community audience. I have fixed a problem with the ia64 version ofbuild_sched_domains(), but a similar fix still needs to be made to thegeneric build_sched_domains() in kernel/sched.c.

The "dynamic sched domains" functionality has recently been merged into2.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 schedgroups to separate away the CPUs in this cpu-exclusive cpuset from theremainder of the non-isolated CPUs. This allows the non-isolated CPUs tocompletely ignore the isolated CPUs when doing load-balancing.

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

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