Re: [PATCH v2 2/3] lockdep: Remove BROKEN flag of LOCKDEP_CROSSRELEASE

From: Thomas Gleixner
Date: Thu Oct 19 2017 - 15:12:13 EST


On Thu, 19 Oct 2017, Thomas Gleixner wrote:
> That's not a lockdep problem and neither can the pure locking dependency
> tracking know that a particular deadlock is not possible by design. It can
> merily record the dependency chains and detect circular dependencies.
>
> There is enough code which is obviously correct in terms of locking which
> has lockdep annotations in one form or the other (nesting, different
> lock_class_keys etc.). These annotations are there to teach lockdep about
> false positives. It's pretty much the same with the cross release feature
> and we won't get these annotations into the code when people disable it

And just for the record, I wasted enough of my time already to decode 'can
not happen' dead locks where completions or other wait primitives have been
involved. I rather spend time annotating stuff after analyzing it proper
than chasing happens once in a blue moon lockups which are completely
unexplainable.

That's why lockdep exists in the first place. Ingo, Steven, myself and
others spent an insane amount of time to fix locking bugs all over the tree
when we started the preempt RT work. Lockdep was a rescue because it forced
people to look at their own crap and if it was 100% clear that lockdep
tripped a false positive either lockdep was fixed or the code in question
annotated, which is a good thing because that's documentation at the same
time.

Thanks,

tglx