Commit 93a65575 authored by Li Zefan's avatar Li Zefan Committed by Linus Torvalds

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
Signed-off-by: default avatarLai Jiangshan <>
Signed-off-by: default avatarLi Zefan <>
Cc: Paul Menage <>
Cc: Cedric Le Goater <>
Cc: Balbir Singh <>
Cc: KAMEZAWA Hiroyuki <>
Reviewed-by: default avatarPaul Jackson <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent f5393693
......@@ -616,7 +616,7 @@ void rebuild_sched_domains(void)
dattr = kmalloc(sizeof(struct sched_domain_attr), GFP_KERNEL);
if (dattr) {
*dattr = SD_ATTR_INIT;
update_domain_attr(dattr, &top_cpuset);
update_domain_attr_tree(dattr, &top_cpuset);
*doms = top_cpuset.cpus_allowed;
goto rebuild;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment