Skip to contentSkip to conversation

sched: improve stability of smpnice load balancing

PATCH New Peter Williams 1 participant 1 message Mar 29, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: improve stability of smpnice load balancing

Problem:

Due to an injudicious piece of code near the end of find_busiest_group() smpnice load balancing is too aggressive resulting in excessive movement of tasks from one CPU to another.

Solution:

Remove the offending code. The thinking that caused it to be included became invalid when find_busiest_queue() was modified to use average load per task (on the relevant run queue) instead of SCHED_LOAD_SCALE when evaluating small imbalance values to see whether they warranted being moved.

Peter

Signature · 4 lines
Peter Williams                                   [email protected]

"Learning, n. The kind of ignorance distinguishing the studious."
 -- Ambrose Bierce
kernel/sched.c +3 -6
Index: MM-2.6.X/kernel/sched.c
===================================================================
@@ -2290,13 +2290,10 @@ find_busiest_group(struct sched_domain *
 		pwr_move /= SCHED_LOAD_SCALE;
 
 		/* Move if we gain throughput */
-		if (pwr_move > pwr_now)
-			*imbalance = busiest_load_per_task;
-		/* or if there's a reasonable chance that *imbalance is big
-		 * enough to cause a move
-		 */
-		 else if (*imbalance <= busiest_load_per_task / 2)
+		if (pwr_move <= pwr_now)
 			goto out_balanced;
+
+		*imbalance = busiest_load_per_task;
 	}
 
 	return busiest;