aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDimitri Sivanich <sivanich@sgi.com>2012-06-05 14:44:36 -0400
committerLuis Henriques <luis.henriques@canonical.com>2012-07-03 11:29:07 -0400
commit0803cdf41d2cfed3a499b31a9ccf408d52680e0b (patch)
treea17dc5ad68bc36ad0b885e35161b446da0f25fbc /kernel
parent9967bbd26d2d9bfaea524afcf536a0f055585862 (diff)
sched: Fix the relax_domain_level boot parameter
BugLink: http://bugs.launchpad.net/bugs/1014712 commit a841f8cef4bb124f0f5563314d0beaf2e1249d72 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 8ae541b2f16..2cc478658fd 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7220,11 +7220,8 @@ int sched_domain_level_max;
7220 7220
7221static int __init setup_relax_domain_level(char *str) 7221static int __init setup_relax_domain_level(char *str)
7222{ 7222{
7223 unsigned long val; 7223 if (kstrtoint(str, 0, &default_relax_domain_level))
7224 7224 pr_warn("Unable to set relax_domain_level\n");
7225 val = simple_strtoul(str, NULL, 0);
7226 if (val < sched_domain_level_max)
7227 default_relax_domain_level = val;
7228 7225
7229 return 1; 7226 return 1;
7230} 7227}
@@ -7417,7 +7414,6 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
7417 if (!sd) 7414 if (!sd)
7418 return child; 7415 return child;
7419 7416
7420 set_domain_attribute(sd, attr);
7421 cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu)); 7417 cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
7422 if (child) { 7418 if (child) {
7423 sd->level = child->level + 1; 7419 sd->level = child->level + 1;
@@ -7425,6 +7421,7 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
7425 child->parent = sd; 7421 child->parent = sd;
7426 } 7422 }
7427 sd->child = child; 7423 sd->child = child;
7424 set_domain_attribute(sd, attr);
7428 7425
7429 return sd; 7426 return sd;
7430} 7427}