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

Sergei Shtylyov sshtylyov at ru.mvista.com
Sat Mar 17 06:20:27 EST 2007


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



More information about the Linuxppc-dev mailing list