RE: [PATCH] idle using PNI monitor/mwait (take 2)

From: Nakajima, Jun
Date: Fri Sep 05 2003 - 15:44:32 EST


We are doing this as defensive programming (because of bogus device
drivers, for example), like the other idle routines (default_idle, and
poll_idle) always do.

BTW, I'm not sure that local_irq_disable() is really required below (as
you know, "sti" is hiding in safe_halt()).

void default_idle(void)
{
if (!hlt_counter && current_cpu_data.hlt_works_ok) {
=> local_irq_disable();
if (!need_resched())
safe_halt();
else
local_irq_enable();
}
}

Thanks,
Jun


> -----Original Message-----
> From: Andrew Morton [mailto:akpm@xxxxxxxx]
> Sent: Friday, September 05, 2003 10:14 AM
> To: Nakajima, Jun
> Cc: linux-kernel@xxxxxxxxxxxxxxx; Saxena, Sunil; Mallick, Asit K;
> Pallipadi, Venkatesh
> Subject: Re: [PATCH] idle using PNI monitor/mwait (take 2)
>
> "Nakajima, Jun" <jun.nakajima@xxxxxxxxx> wrote:
> >
> > Attached is a patch that enables PNI (Prescott New Instructions)
> > monitor/mwait in the kernel idle.
>
> Thanks, looks good.
>
> Why is there a local_irq_enable() on entry to mwait_idle()?

-
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/