Re: [RFC 1/4] lockdep: additional lock specific information when dumping locks

Sasha Levin
2015-01-13T05:19:07Z

On 01/12/2015 11:23 AM, Peter Zijlstra wrote:
>>> > > Alternatively, make better/more use of lock_acquired() and track the
>>> > > acquire vs acquired information in the held_lock (1 bit) and look at it
>>> > > when printing.
>> >
>> > We could do that, but then we'd lose the ability to get information out of
>> > locks, what's the benefit of doing that?
> That's mission creep; you never stated that as a goal.
>
> One of the reasons i'm not particularly keen on it is because it creates
> a circular dependency between lock implementations and lockdep. It also
> creates asymmetry between lock types/capabilty.

Fair enough.

__lock_acquired() which looks up held_lock doesn't happen unless
CONFIG_LOCK_STAT is set, which means that if we want to use this method we'd
need to look up held_lock just for that, which would make that path heavier.

Before I go ahead and implement it, do you find it acceptable?

Thanks,
Sasha