aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorKen Chen <kenchen@google.com>2008-12-07 21:47:37 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-08 07:52:44 -0500
commit5436499e6098759c2340f8b906ea52f993dc4efb (patch)
tree5af189c8d0d8bf5bc6261a427c371bd4d8ba7474 /kernel/sched.c
parent4d117c5c6b00254e51c61ff5b506ccaba21a5a03 (diff)
sched: fix sd_parent_degenerate on non-numa smp machine
Impact: optimize the sched domains tree some more 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> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 152828239ef0..74498c840f93 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6768,6 +6768,8 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent)
6768 SD_BALANCE_EXEC | 6768 SD_BALANCE_EXEC |
6769 SD_SHARE_CPUPOWER | 6769 SD_SHARE_CPUPOWER |
6770 SD_SHARE_PKG_RESOURCES); 6770 SD_SHARE_PKG_RESOURCES);
6771 if (nr_node_ids == 1)
6772 pflags &= ~SD_SERIALIZE;
6771 } 6773 }
6772 if (~cflags & pflags) 6774 if (~cflags & pflags)
6773 return 0; 6775 return 0;