All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] sched: fix sd_parent_degenerate on non-numa smp machine
@ 2008-12-08  2:47 Ken Chen
  2008-12-08 12:53 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Chen @ 2008-12-08  2:47 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: Linux Kernel Mailing List

The addition of SD_SERIALIZE flag added to SD_NODE_INIT prevented top level
dummy numa sched_domain to be properly degenerated on non-numa smp machine.
The reason is that in sd_parent_degenerate(), it found that the child and
parent does not have comon sched_domain flags due to SD_SERIALIZE.  However,
for non-numa smp box, the top level is a dummy with a single sched_group.

Filter out SD_SERIALIZE if it is on non-numa machine to properly degenerate
top level node sched_domain.  this will cut back some of the sd domain walk
in the load balancer code.

Signed-off-by: Ken Chen <kenchen@google.com>

diff --git a/kernel/sched.c b/kernel/sched.c
index b7480fb..6beae36 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6814,6 +6814,8 @@ sd_parent_degenerate
 				SD_BALANCE_EXEC |
 				SD_SHARE_CPUPOWER |
 				SD_SHARE_PKG_RESOURCES);
+		if (nr_node_ids == 1)
+			pflags &= ~SD_SERIALIZE;
 	}
 	if (~cflags & pflags)
 		return 0;

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

* Re: [patch] sched: fix sd_parent_degenerate on non-numa smp machine
  2008-12-08  2:47 [patch] sched: fix sd_parent_degenerate on non-numa smp machine Ken Chen
@ 2008-12-08 12:53 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-12-08 12:53 UTC (permalink / raw)
  To: Ken Chen; +Cc: Peter Zijlstra, Linux Kernel Mailing List


* Ken Chen <kenchen@google.com> wrote:

> The addition of SD_SERIALIZE flag added to SD_NODE_INIT prevented top level
> dummy numa sched_domain to be properly degenerated on non-numa smp machine.
> The reason is that in sd_parent_degenerate(), it found that the child and
> parent does not have comon sched_domain flags due to SD_SERIALIZE.  However,
> for non-numa smp box, the top level is a dummy with a single sched_group.
> 
> Filter out SD_SERIALIZE if it is on non-numa machine to properly degenerate
> top level node sched_domain.  this will cut back some of the sd domain walk
> in the load balancer code.
> 
> Signed-off-by: Ken Chen <kenchen@google.com>

applied to tip/sched/core, thanks Ken!

	Ingo

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

end of thread, other threads:[~2008-12-08 12:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-08  2:47 [patch] sched: fix sd_parent_degenerate on non-numa smp machine Ken Chen
2008-12-08 12:53 ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.