public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] sched: fix active load balance
@ 2005-04-13 19:07 Siddha, Suresh B
  2005-04-13 20:08 ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Siddha, Suresh B @ 2005-04-13 19:07 UTC (permalink / raw)
  To: nickpiggin, akpm; +Cc: linux-kernel

Recent changes to active load balance (sched2-fix-smt-scheduling-problems.patch
in -mm) is not resulting in any task movement from busiest to target_cpu.
Attached patch(ontop of -mm) fixes this issue.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>

--- linux-2.6.12-rc2-mm3/kernel/sched.c	2005-04-11 23:08:30.875103512 -0700
+++ linux/kernel/sched.c	2005-04-13 10:44:37.400829992 -0700
@@ -2131,7 +2131,7 @@
  */
 static void active_load_balance(runqueue_t *busiest_rq, int busiest_cpu)
 {
-	struct sched_domain *tmp = NULL, *sd;
+	struct sched_domain *sd;
 	runqueue_t *target_rq;
 	int target_cpu = busiest_rq->push_cpu;
 
@@ -2152,13 +2152,10 @@
 	double_lock_balance(busiest_rq, target_rq);
 
 	/* Search for an sd spanning us and the target CPU. */
-	for_each_domain(target_cpu, sd) {
+	for_each_domain(target_cpu, sd)
 		if ((sd->flags & SD_LOAD_BALANCE) &&
-			cpu_isset(busiest_cpu, sd->span)) {
-				sd = tmp;
+			cpu_isset(busiest_cpu, sd->span))
 				break;
-		}
-	}
 
 	if (unlikely(sd == NULL))
 		goto out;

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

end of thread, other threads:[~2005-04-14  7:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-13 19:07 [patch] sched: fix active load balance Siddha, Suresh B
2005-04-13 20:08 ` Ingo Molnar
2005-04-13 20:28   ` Siddha, Suresh B
2005-04-13 23:06     ` Nick Piggin
2005-04-14  7:23     ` Ingo Molnar

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