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

From: Peter Zijlstra
Date: Thu Oct 30 2008 - 07:15:09 EST


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.


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