[PATCH] Celleb: improve htab lock

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Feb 9 09:32:07 EST 2007


On Thu, 2007-02-08 at 21:43 +0100, Arnd Bergmann wrote:
> On Thursday 08 February 2007 21:28, Christoph Hellwig wrote:
> >  Also if we're sure that this is
> > always called from process context and with irqs enabled we should
> > be using local_irq_disable/local_irq_enable and avoid saving the
> > flags word.
> 
> Right, that's what I meant, I was a little confused here.

I prefer saving for now. We can be called whenever there is a
flush_tlb_pending() called for flushing a pending batch and that is in
quite a few places including deep in the context switching code, I
wouldn't make assumption on the irq state on entry.

I do intend at one point to move the local_irq_save/restore up a level
though, so that all the htab functions have the same semantic of being
called with IRQs off. Right now, the invalidate ones are sort-of an
exception.

Ben.





More information about the Linuxppc-dev mailing list