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

From: Sasha Levin
Date: Tue Jan 13 2015 - 00:19:11 EST


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