Hi,
in the migration scheme included into the 2.5.6-pre1 kernel there is a
potential deadlock (which I encountered several times) in the migration
task. If interrupts are not disabled before aquiring the double rq lock
this task can be interrupted by a scheduler_tick() which will spinwait
forever.
Best regards,
Erich
diff -urN 2.5.6-pre1/kernel/sched.c 2.5.6-pre1-fix/kernel/sched.c
--- 2.5.6-pre1/kernel/sched.c Thu Feb 28 19:10:49 2002
+++ 2.5.6-pre1-fix/kernel/sched.c Thu Feb 28 19:14:29 2002
@@ -1626,9 +1626,11 @@
cpu_src = p->thread_info->cpu;
rq_src = cpu_rq(cpu_src);
+ local_irq_save(flags);
double_rq_lock(rq_src, rq_dest);
if (p->thread_info->cpu != cpu_src) {
double_rq_unlock(rq_src, rq_dest);
+ local_irq_restore(flags);
goto repeat;
}
if (rq_src == rq) {
@@ -1639,6 +1641,7 @@
}
}
double_rq_unlock(rq_src, rq_dest);
+ local_irq_restore(flags);
up(&req->sem);
}