mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: improve stability of smpnice load balancing
@ 2006-03-29 22:29 Peter Williams
  0 siblings, 0 replies; only message in thread
From: Peter Williams @ 2006-03-29 22:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Con Kolivas, Chen, Kenneth W, Ingo Molnar, Nick Piggin,
	Mike Galbraith, Siddha, Suresh B, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

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.

Signed-off-by: Peter Williams <pwil3058@bigpond.com.au>

Peter
-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

[-- Attachment #2: smpnice-increase-stability --]
[-- Type: text/plain, Size: 704 bytes --]

Index: MM-2.6.X/kernel/sched.c
===================================================================
--- MM-2.6.X.orig/kernel/sched.c	2006-03-29 16:18:37.000000000 +1100
+++ MM-2.6.X/kernel/sched.c	2006-03-29 16:20:37.000000000 +1100
@@ -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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-29 22:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-29 22:29 [PATCH] sched: improve stability of smpnice load balancing Peter Williams

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

Powered by JetHome