Re: [PATCH 1/2] lockdep: implement full check without irq checking

From: Johannes Berg
Date: Thu Oct 30 2008 - 07:25:30 EST


On Thu, 2008-10-30 at 12:15 +0100, Peter Zijlstra wrote:
> On Thu, 2008-10-30 at 11:36 +0100, Johannes Berg wrote:
>
> > > del_timer_sync():
> > >
> > > local_irq_save(flags);
> > > lock_aquire(my fake timer lock);
> > > lock_release(...);
> > > local_irq_restore(flags);
> > >
> > > and make that conditional CONFIG_PROVE_LOCKING and or wrap it up
> > > somewhere..
> >
> > Yeah, that is possible, but it seemed to me that would affect the
> > performance of del_timer_sync() quite a bit. Not sure it matters. And on
> > powerpc (which I care about) it won't actually affect performance much
> > because we lazily disable IRQs, but still. The >= 2 change also seemed
> > to generate smaller code?
>
> Its debug code, and I the >= 2 change makes the code much less obvious.
>
> So I prefer the slightly less performant but conceptually cleaner IRQ
> disable variant.

Alright. Thomas, shout if you want this code at all, then I'll clean it
up and resend, I don't particularly care, just did it to see if it was
possible.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part