public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] cpuset: fix wrong calculation of relax domain level
@ 2008-07-28  2:47 Li Zefan
  2008-07-28  5:15 ` Paul Jackson
  0 siblings, 1 reply; 5+ messages in thread
From: Li Zefan @ 2008-07-28  2:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Paul Jackson, Paul Menage, Hidetoshi Seto, Lai Jiangshan, LKML

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>
---
 kernel/cpuset.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index d274a94..b1f1fa1 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -614,7 +614,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;
-- 
1.5.4.rc3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-29 13:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-28  2:47 [PATCH 3/3] cpuset: fix wrong calculation of relax domain level Li Zefan
2008-07-28  5:15 ` Paul Jackson
2008-07-29  2:16   ` Li Zefan
2008-07-29 13:05     ` Paul Jackson
2008-07-29 13:11     ` Paul Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox