[PATCH] Lazy interrupt disabling for 64-bit machines

Olof Johansson olof at lixom.net
Tue Sep 26 16:10:55 EST 2006

On Tue, 26 Sep 2006 14:55:30 +1000 Paul Mackerras <paulus at samba.org> wrote:

> This implements a lazy strategy for disabling interrupts.  This means
> that local_irq_disable() et al. just clear the 'interrupts are
> enabled' flag in the paca.  If an interrupt comes along, the interrupt
> entry code notices that interrupts are supposed to be disabled, and
> clears the EE bit in SRR1, clears the 'interrupts are hard-enabled'
> flag in the paca, and returns.  This means that interrupts only
> actually get disabled in the processor when an interrupt comes along.
> When interrupts are enabled by local_irq_enable() et al., the code
> sets the interrupts-enabled flag in the paca, and then checks whether
> interrupts got hard-disabled.  If so, it also sets the EE bit in the
> MSR to hard-enable the interrupts.
> This has the potential to improve performance, and also makes it
> easier to make a kernel that can boot on iSeries and on other 64-bit
> machines, since this lazy-disable strategy is very similar to the
> soft-disable strategy that iSeries already uses.

I like it. Got any benchmarks that show a difference?

At first glance I found it a bit hard to follow, since the old+new
terminology is a bit complicated. There's softe, proc_enabled and
hard_enabled. A s/proc_enabled/soft_enabled/g (and similar for
asm-offsets) might make it a little more intuitive, since you're
touching most uses of it already?


More information about the Linuxppc-dev mailing list