Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a841f8ce authored by Dimitri Sivanich's avatar Dimitri Sivanich Committed by Ingo Molnar
Browse files

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: default avatarDimitri Sivanich <sivanich@sgi.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120605184436.GA15668@sgi.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent d039ac60
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -6268,11 +6268,8 @@ int sched_domain_level_max;


static int __init setup_relax_domain_level(char *str)
static int __init setup_relax_domain_level(char *str)
{
{
	unsigned long val;
	if (kstrtoint(str, 0, &default_relax_domain_level))

		pr_warn("Unable to set relax_domain_level\n");
	val = simple_strtoul(str, NULL, 0);
	if (val < sched_domain_level_max)
		default_relax_domain_level = val;


	return 1;
	return 1;
}
}
@@ -6698,7 +6695,6 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
	if (!sd)
	if (!sd)
		return child;
		return child;


	set_domain_attribute(sd, attr);
	cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
	cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
	if (child) {
	if (child) {
		sd->level = child->level + 1;
		sd->level = child->level + 1;
@@ -6706,6 +6702,7 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
		child->parent = sd;
		child->parent = sd;
	}
	}
	sd->child = child;
	sd->child = child;
	set_domain_attribute(sd, attr);


	return sd;
	return sd;
}
}