[PATCH] Lazy interrupt disabling for 64-bit machines

Olof Johansson olof at lixom.net
Wed Sep 27 01:43:13 EST 2006

On Tue, 26 Sep 2006 19:12:06 +1000 Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:

> > 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?
> Now think about using -ffixed=crN ... reserve a CR field and use that
> for per-cpu flags like that :)

You can also get away from doing the mfspr(SPRN_DEC) in
local_irq_enable() by changing the polarity of hard_enabled to
hard_disabled, and have different values for why it was disabled. Saves
an mfspr which can be costly, but adds one instruction (li (n>>8) or
so) in the exception entry path. Not which way that tradeoff will
swing, without benchmarking to show benefit it's just added complexity.

That can be done with a fixed cr too, it just uses two bits instead of
one. There are fewer to take from there though.


More information about the Linuxppc-dev mailing list