cpuset: fix wrong calculation of relax domain level
When multiple cpusets are overlapping in their 'cpus' and hence they form a single sched domain, the largest sched_relax_domain_level among those should be used. But when top_cpuset's sched_load_balance is set, its sched_relax_domain_level is used regardless other sub-cpusets'. This patch fixes it by walking the cpuset hierarchy to find the largest sched_relax_domain_level. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Paul Menage <menage@google.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f5393693e9
commit
93a6557558
|
@ -616,7 +616,7 @@ void rebuild_sched_domains(void)
|
||||||
dattr = kmalloc(sizeof(struct sched_domain_attr), GFP_KERNEL);
|
dattr = kmalloc(sizeof(struct sched_domain_attr), GFP_KERNEL);
|
||||||
if (dattr) {
|
if (dattr) {
|
||||||
*dattr = SD_ATTR_INIT;
|
*dattr = SD_ATTR_INIT;
|
||||||
update_domain_attr(dattr, &top_cpuset);
|
update_domain_attr_tree(dattr, &top_cpuset);
|
||||||
}
|
}
|
||||||
*doms = top_cpuset.cpus_allowed;
|
*doms = top_cpuset.cpus_allowed;
|
||||||
goto rebuild;
|
goto rebuild;
|
||||||
|
|
Loading…
Reference in New Issue