[PATCH] active_load_balance() deadlock

From: Bjorn Helgaas
Date: Tue Jun 01 2004 - 15:12:36 EST


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.

===== kernel/sched.c 1.304 vs edited =====
--- 1.304/kernel/sched.c 2004-05-27 02:26:55 -06:00
+++ edited/kernel/sched.c 2004-05-31 12:03:32 -06:00
@@ -1847,6 +1847,8 @@
}

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);




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/