On Fri, Oct 02, 2020 at 03:09:29PM +0200, Peter Zijlstra wrote: > On Fri, Oct 02, 2020 at 08:36:02PM +0800, Boqun Feng wrote: > > > But what if f2() is called with interrupt disabled? Or f2() disables > > interrupt inside the function, like: > > > > void f2(...) > > { > > local_irq_disable(); > > spin_lock(&B); > > g(...); > > ... > > local_irq_enable(); > > } > > > > In this case, there wouldn't be any LOCK_ENABLED_*_READ usage for > > rwlock_t A. As a result, we won't see it in the lockdep splat. > > Hurm, fair enough. So just to make sure, you're arguing for: > > -#define LOCK_TRACE_STATES (XXX_LOCK_USAGE_STATES*4 + 1) > +#define LOCK_TRACE_STATES (XXX_LOCK_USAGE_STATES*4 + 2) > > On top of my earlier patch, right?
Yep. Thanks ;-) Regards, Boqun