The problem is caused by reschedule_idle(), uniprocessor version:
if (preemption_goodness(tsk, p, this_cpu) > 1)
tsk->need_resched = 1;
For real-time scheduling to work correctly, need_resched should be set
whenever preemption_goodness() is greater than 0, not 1.
Here is a patch against 2.4.3:
--- 2.4.3/kernel/sched.c Thu Apr 19 15:03:21 2001
+++ linux/kernel/sched.c Fri Apr 20 16:45:07 2001
@@ -290,7 +290,7 @@
struct task_struct *tsk;
tsk = cpu_curr(this_cpu);
- if (preemption_goodness(tsk, p, this_cpu) > 1)
+ if (preemption_goodness(tsk, p, this_cpu) > 0)
tsk->need_resched = 1;
#endif
}
Nigel Gamble nigel@nrg.org
Mountain View, CA, USA. http://www.nrg.org/
MontaVista Software nigel@mvista.com
-
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/