projects/linux·commit d10689b6

[PATCH] cpu_exclusive sched domains on partial nodes temp fix

d10689b6 · Paul Jackson <[email protected]> · 2005-08-23 01:04:27 -07:00

This keeps the kernel/cpuset.c routine update_cpu_domains() from
invoking the sched.c routine partition_sched_domains() if the cpuset in
question doesn't fall on node boundaries.

I have boot tested this on an SN2, and with the help of a couple of ad
hoc printk's, determined that it does indeed avoid calling the
partition_sched_domains() routine on partial nodes.

I did not directly verify that this avoids setting up bogus sched
domains or avoids the oops that Hawkes saw.

This patch imposes a silent artificial constraint on which cpusets can
be used to define dynamic sched domains.

This patch should allow proceeding with this new feature in 2.6.13 for
the configurations in which it is useful (node alligned sched domains)
while avoiding trying to setup sched domains in the less useful cases
that can cause the kernel corruption and oops.

Signed-off-by: Paul Jackson <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Acked-by: Dinakar Guniguntala <[email protected]>
Acked-by: John Hawkes <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
d10689b68aff7b48e3de1a3f7fcd6567bd2905af
Parents
ae75784b

Changes

1 files changed · +17 −0

FileStatusAddDelContent
kernel/cpuset.cmodified+17−0View file

kernel/cpuset.c

View file
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 21a4e3b..e0d296c 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -636,6 +636,23 @@ static void update_cpu_domains(struct cpuset *cur)
return;
/*
+ * Hack to avoid 2.6.13 partial node dynamic sched domain bug.
+ * Require the 'cpu_exclusive' cpuset to include all (or none)
+ * of the CPUs on each node, or return w/o changing sched domains.
+ * Remove this hack when dynamic sched domains fixed.
+ */
+ {
+ int i, j;
+
+ for_each_cpu_mask(i, cur->cpus_allowed) {
+ for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) {
+ if (!cpu_isset(j, cur->cpus_allowed))
+ return;
+ }
+ }
+ }
+
+ /*
* Get all cpus from parent's cpus_allowed not part of exclusive
* children
*/