sched: Fix the sched group node allocation for SD_OVERLAP domains
authorSuresh Siddha <suresh.b.siddha@intel.com>
Fri, 18 Nov 2011 23:03:29 +0000 (15:03 -0800)
committerIngo Molnar <mingo@elte.hu>
Tue, 6 Dec 2011 08:06:26 +0000 (09:06 +0100)
For the SD_OVERLAP domain, sched_groups for each CPU's sched_domain are
privately allocated and not shared with any other cpu. So the
sched group allocation should come from the cpu's node for which
SD_OVERLAP sched domain is being setup.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20111118230554.164910950@sbsiddha-desk.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched/core.c

index db313c33af29cbd8b042a24f953091a923b985c8..07f1e9935f211ecd403212cacca5f1bd768a1e6f 100644 (file)
@@ -5885,7 +5885,7 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
                        continue;
 
                sg = kzalloc_node(sizeof(struct sched_group) + cpumask_size(),
-                               GFP_KERNEL, cpu_to_node(i));
+                               GFP_KERNEL, cpu_to_node(cpu));
 
                if (!sg)
                        goto fail;