Skip to contentSkip to conversation

sched: fix sd_parent_degenerate on non-numa smp machine

PATCH Applied Ken Chen 2 participants 2 messages Dec 8, 2008

lore
Share & tools
lore

Ken Chen

author
#0 lore raw

PATCH 1/1 sched: fix sd_parent_degenerate on non-numa smp machine

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.

kernel/sched.c +2 -0
index b7480fb..6beae36 100644
@@ -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;
Applied
#1 lore raw
Quoted 11 lines · Ken Chen

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.

applied to tip/sched/core, thanks Ken!

Ingo