aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2008-07-30 01:33:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 12:41:44 -0400
commit93a6557558a13f9ff35213efeca483f353c39dd3 (patch)
tree36a426a166f7992a4cc55c0c950a49326868f2d5 /kernel/cpuset.c
parentf5393693e96393131a4a2e2743f883986d508503 (diff)
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>
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index c818c36b0c5..7a82e9033a7 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -616,7 +616,7 @@ void rebuild_sched_domains(void)
616 dattr = kmalloc(sizeof(struct sched_domain_attr), GFP_KERNEL); 616 dattr = kmalloc(sizeof(struct sched_domain_attr), GFP_KERNEL);
617 if (dattr) { 617 if (dattr) {
618 *dattr = SD_ATTR_INIT; 618 *dattr = SD_ATTR_INIT;
619 update_domain_attr(dattr, &top_cpuset); 619 update_domain_attr_tree(dattr, &top_cpuset);
620 } 620 }
621 *doms = top_cpuset.cpus_allowed; 621 *doms = top_cpuset.cpus_allowed;
622 goto rebuild; 622 goto rebuild;