Sure, all my testing is on SMP. The problem manifested itself in
2.5.8-pre when some changes where made to the migration code. The race
is in the migration code - I am not sure it is preempts fault, per se,
but the attached patch should fix it. It is pending with Linus for the
next release.
Robert Love
diff -urN linux-2.5.8/kernel/sched.c linux/kernel/sched.c
--- linux-2.5.8/kernel/sched.c Sun Apr 14 15:18:47 2002
+++ linux/kernel/sched.c Mon Apr 15 14:47:18 2002
@@ -1649,6 +1649,7 @@
if (!new_mask)
BUG();
+ preempt_disable();
rq = task_rq_lock(p, &flags);
p->cpus_allowed = new_mask;
/*
@@ -1657,7 +1658,7 @@
*/
if (new_mask & (1UL << p->thread_info->cpu)) {
task_rq_unlock(rq, &flags);
- return;
+ goto out;
}
init_MUTEX_LOCKED(&req.sem);
@@ -1667,6 +1668,8 @@
wake_up_process(rq->migration_thread);
down(&req.sem);
+out:
+ preempt_enable();
}
static volatile unsigned long migration_mask;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/