On Fri, Aug 21, 2026 at 09:56:05AM +0200, David Hildenbrand (Arm) wrote:
[...]
Q. Why not build DEPT into lockdep?
A. Lockdep is stable, battle-tested code. I chose separation because while DEPT borrows BFS and hashing ideas, the wait/event model requires rebuilding from scratch. Lockdep was designed for lock acquisition order — retrofitting it would risk its stability.
Why can't this just be some configurable extension to lockdep (CONFIG_LOCKDEP_XYZ) until the feature is stable and can unconditionally be enabled along with it?
Answered?
Not quite. I don't understand why this must be a completely separate machinery, even if, conceptually, it would do more than traditional lockdep.
Is it either DEPT or LOCKDEP in current configurations? Can both run at the same time?
Yes.
I don't quite buy the "would risk its stability" argument. A lot of stuff we do "risks stability", every day :)
That's awsome anyway :)
Is there another good reason (incompatible with X, dangerous with Y, cinfusing Z) why this really must be a separate thing?
Roughly:
Similar or less effort is needed for the new one - retrofitting lockdep is not easy and big changes are required since the reusable parts are not that big.
Even though you didn't agree, retrofitting it would risk its stability.
Well, I don't buy the stability argument, really :)
Retrofitting effort for lockdep is an interesting point, though. Lockdep maintainers would have to make the call here regarding direction and feasibility.
[...]
But I am not a locking maintainer. I think there was plenty of discussion in the past, so I might just be raising points that were already discussed in the past, but I really just read some random pieces of earlier discussions. (ideally previous discussions would be summarized here)
Long story short: we are now in v19 and I think there was pushback in the past. Did the opinion of locking maintainers change, or is there a way forward to integrate this in a way that would make locking maintainers accept this?
One of locking maintainers who I met in an LPC told me that he agrees with the direction of DEPT and supports DEPT, not officially tho.
Hm.
What he and other people are concerning w.r.t DEPT the most is, false positives, which is the most important issue for now.
Thanks for highlighting that. What's the main reason for false positives? Is it something conceptual that is mostly impossible to solve, or rather just implementation work to cover all edge cases?
It's because of lack of annotations for proper classification. As Willy mentioned, different call paths for various usages should be annotated with different classes throughout the kernel.
At the same time, I think the most important thing is to make DEPT useful in practice especially with folio locks involved. Actually, I'm planning to share DEPT's true reports periodically to LKML and work with people who believe DEPT can make things better.
Any advices will be welcome. Thanks for your opinions.
I think we must come to some conclusion on how to proceed with DEPT. I see the following options:
(1) Don't merge it and carry it OOT. Shame if it delivers real value.
(2) Merge it (after proper review and acks from relevant maintainers ;) ), keeping it entirely separate from lockdep.
(3) Integrate it with lockdep on a high level, giving us a single locking dependency checker, but mostly letting dept have a separate implementation. Look into possible merging afterwards.
(4) Retrofit and extend lockdep to really have one mechanism.
As the saying goes, it's hard to teach old dogs new tricks, but in the end taking care of two dogs is likely harder than only a single dog? :)
Or it's better to train a unmatured hunting dog than to teach a pet dog, how to hunt, for better hunting, even though the pet dog might eventually become able to.
I tend to favor (4) (or 3 with possible future work to achieve 4), but I am not a locking maintainer, so really they have to voice what to do.
Right. However, thanks for your opinion.
I do see value in DEPT (even if the folio lock might be handled differently).
Thanks!
Byungchul
-- Cheers,
David