aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDimitri Sivanich <sivanich@sgi.com>2012-06-05 14:44:36 -0400
committerIngo Molnar <mingo@kernel.org>2012-06-06 11:07:41 -0400
commita841f8cef4bb124f0f5563314d0beaf2e1249d72 (patch)
treeb846a9065f021313027f1bbc489743c43ea5869e /kernel
parentd039ac60800fe8ed8522ec3b9ca796aaf748c18b (diff)
sched: Fix the relax_domain_level boot parameter
It does not get processed because sched_domain_level_max is 0 at the time that setup_relax_domain_level() is run. Simply accept the value as it is, as we don't know the value of sched_domain_level_max until sched domain construction is completed. Fix sched_relax_domain_level in cpuset. The build_sched_domain() routine calls the set_domain_attribute() routine prior to setting the sd->level, however, the set_domain_attribute() routine relies on the sd->level to decide whether idle load balancing will be off/on. Signed-off-by: Dimitri Sivanich <sivanich@sgi.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20120605184436.GA15668@sgi.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2bdd17616437..d5594a4268d4 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6268,11 +6268,8 @@ int sched_domain_level_max;
6268 6268
6269static int __init setup_relax_domain_level(char *str) 6269static int __init setup_relax_domain_level(char *str)
6270{ 6270{
6271 unsigned long val; 6271 if (kstrtoint(str, 0, &default_relax_domain_level))
6272 6272 pr_warn("Unable to set relax_domain_level\n");
6273 val = simple_strtoul(str, NULL, 0);
6274 if (val < sched_domain_level_max)
6275 default_relax_domain_level = val;
6276 6273
6277 return 1; 6274 return 1;
6278} 6275}
@@ -6698,7 +6695,6 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
6698 if (!sd) 6695 if (!sd)
6699 return child; 6696 return child;
6700 6697
6701 set_domain_attribute(sd, attr);
6702 cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu)); 6698 cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
6703 if (child) { 6699 if (child) {
6704 sd->level = child->level + 1; 6700 sd->level = child->level + 1;
@@ -6706,6 +6702,7 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
6706 child->parent = sd; 6702 child->parent = sd;
6707 } 6703 }
6708 sd->child = child; 6704 sd->child = child;
6705 set_domain_attribute(sd, attr);
6709 6706
6710 return sd; 6707 return sd;
6711} 6708}