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

From: Jamie Lokier
Date: Fri Sep 05 2003 - 17:07:28 EST


Jamie Lokier wrote:
> local_irq_disable() isn't required in the monitor/mwait loop, because
> you check need_resched between the monitor and mwait. (If Intel had
> implemented monitor+mwait as a single instruction, then you'd need it).
>
> So you can remove it from your loop.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Excuse me, I hadn't looked at your code closely. Everything I said up
to that last line is fine. But the last line doesn't apply because
you don't have a local_irq_disable().

You can remove your local_irq_enable() instead, if you want, but for
a different reason. That one _is_ defensive. :)

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