aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2004-05-31 23:40:59 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-31 23:40:59 -0700
commit810ce4cd6fe48276ec8068135a71ab50193883c7 (patch)
tree302ec0baa9e17ce3b83869f79ae5ddc218074d08 /kernel
parent40046d1a42eebbb259a8c4c34864f64b403fc010 (diff)
downloadhistory-810ce4cd6fe48276ec8068135a71ab50193883c7.tar.gz
[PATCH] active_load_balance() deadlock
active_load_balance() looks susceptible to deadlock when busiest==rq. Without the following patch, my 128-way box deadlocks consistently during boot-time driver init.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index e4966cb2a41c11..af767b38ca0609 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1844,6 +1844,8 @@ static void active_load_balance(runqueue_t *busiest, int busiest_cpu)
}
rq = cpu_rq(push_cpu);
+ if (busiest == rq)
+ goto next_group;
double_lock_balance(busiest, rq);
move_tasks(rq, push_cpu, busiest, 1, sd, IDLE);
spin_unlock(&rq->lock);