On 06.01.2021 23:39, Andrew Lunn wrote:
> On Wed, Jan 06, 2021 at 02:03:40PM +0100, Heiner Kallweit wrote:
>> Switch to lockdep_assert_held(_once), similar to what is being done
>> in other subsystems. One advantage is that there's zero runtime
>> overhead if lockdep support isn't enabled.
> 
> Hi Heiner
> 
Hi Andrew,

> I'm not sure we are bothered about performance here. MDIO operations
> are slow, a mutex check is fast relative to that.
> 
Right, the performance gain is neglectible here.

What I see is that more and more similar checks (e.g. in_softirq,
in_irq) are migrated to the lockdep framework. And as stated in the
commit message I've seen a number of equivalent patches in other
subsystems.

> I wonder how many do development work with lockdep enabled? I think i
> prefer catching hard to find locking bugs earlier, verses a tiny
> performance overhead.
> 
Well, I always develop with lockdep enabled and like the fact that it
provides a multitude of checks with minimal overhead. Would be
interesting to know the ratio of kernel developers counting on lockdep.

>        Andrew
> 
Heiner

Reply via email to