Re: [patch 1/6 -rt] powerpc 2.6.20-rt8: add preemption checks forNEED_RESCHED_DELAYED.

From: Sergei Shtylyov
Date: Fri Mar 16 2007 - 15:20:55 EST


Hello.

Tsutomu OWA wrote:
To add preemption checks for the NEED_RESCHED_DELAYED flag.

diff -rup linux-rt8/arch/powerpc/kernel/idle.c rt/arch/powerpc/kernel/idle.c
--- linux-rt8/arch/powerpc/kernel/idle.c 2007-02-20 14:30:38.000000000 +0900
+++ rt/arch/powerpc/kernel/idle.c 2007-02-20 15:43:04.000000000 +0900
@@ -56,7 +56,8 @@ void cpu_idle(void)
set_thread_flag(TIF_POLLING_NRFLAG);
while (1) {
- while (!need_resched() && !cpu_should_die()) {
+ while (!need_resched() && !need_resched_delayed() &&
+ !cpu_should_die()) {
ppc64_runlatch_off();
if (ppc_md.power_save) {

Argh, I've missed this one! :-(
But shouldn't we also add !need_resched_delayed() to another place below?

if (ppc_md.power_save) {
[...]
if (!need_resched() && !cpu_should_die())

WBR, Sergei
-
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/