Return-Path: Received: from inet-tsb5.toshiba.co.jp (inet-tsb5.toshiba.co.jp [202.33.96.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id C03A2DDEDB for ; Mon, 14 May 2007 16:29:58 +1000 (EST) Date: Mon, 14 May 2007 15:29:17 +0900 Message-ID: From: Tsutomu OWA To: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [patch 3/4] powerpc 2.6.21-rt1: add a need_resched_delayed() check In-Reply-To: References: MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Cc: mingo@elte.hu, tglx@linutronix.de List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Add a need_resched_delayed() check. This was pointed by Sergei Shtylyov; http://ozlabs.org/pipermail/linuxppc-dev/2007-March/033148.html Signed-off-by: Tsutomu Owa -- owa diff -rup linux-2.6.21-rt1/arch/powerpc/kernel/idle.c rt/arch/powerpc/kernel/idle.c --- linux-2.6.21-rt1/arch/powerpc/kernel/idle.c 2007-05-07 14:08:12.000000000 +0900 +++ rt/arch/powerpc/kernel/idle.c 2007-05-07 14:05:30.000000000 +0900 @@ -70,7 +70,9 @@ void cpu_idle(void) local_irq_disable(); /* check again after disabling irqs */ - if (!need_resched() && !cpu_should_die()) + if (!need_resched() && + !need_resched_delayed() && + !cpu_should_die()) ppc_md.power_save(); local_irq_enable();