Re: [PATCH] ia64 cpuset + build_sched_domains() mangles structures
From: Dinakar Guniguntala
Date: Mon Aug 22 2005 - 16:37:25 EST
On Mon, Aug 22, 2005 at 09:08:34AM +0200, Ingo Molnar wrote:
>
> in terms of 2.6.14, the replacement patch below also does what i always
> wanted to do: to merge the ia64-specific build_sched_domains() code back
> into kernel/sched.c. I've done this by taking your improved dynamic
> build-domains code and putting it into kernel/sched.c.
>
Ingo, one change required to your patch and the exclusive
cpuset functionality seems to work fine on a NUMA ppc64 box.
I am still running some of my dynamic sched domain tests. So far
it seems to be holding ok.
Any idea why the ia64 stuff was forked in the first place?
The patch below is on top of your patch. (This is the earlier patch
John had sent)
-Dinakar
diff -Naurp linux-2.6.13-rc6.ingo/kernel/sched.c linux-2.6.13-rc6/kernel/sched.c
--- linux-2.6.13-rc6.ingo/kernel/sched.c 2005-08-22 19:23:06.000000000 +0530
+++ linux-2.6.13-rc6/kernel/sched.c 2005-08-22 19:36:45.000000000 +0530
@@ -5192,7 +5192,7 @@ next_sg:
#endif
/* Attach the domains */
- for_each_online_cpu(i) {
+ for_each_cpu_mask(i, *cpu_map) {
struct sched_domain *sd;
#ifdef CONFIG_SCHED_SMT
sd = &per_cpu(cpu_domains, i);