[Intel-gfx] [PATCH v5] drm/i915: Avoid circular locking dependency when flush delayed work on gt reset

Daniel Vetter daniel at ffwll.ch
Wed Sep 6 11:02:41 UTC 2023


On Wed, Sep 06, 2023 at 01:04:06PM +0300, Jani Nikula wrote:
> On Wed, 06 Sep 2023, Andi Shyti <andi.shyti at linux.intel.com> wrote:
> > It's the developer's responsibility to test its code with
> > debug_lockdep and fix all the potential deadlocks and ignore the
> > false ones.
> 
> No. Manual validation of lockdep reports is not feasible. Lockdep is the
> tool to validate locking. It's the developer's responsibility to make
> lockdep understand the design.

Yeah I guess I need to drop my locking design principle once more:

If lockdep doesn't understand your locking design, your design is shit.

You need to fix the design, not play whack-a-mole with lockdep. Or worse,
pretend there's no problem and just disable lockdep outright.

If you don't understand your design, and can't succinctly explain it (or
demonstrate the full hierarchy with lockdep priming, testing in CI isn't
good enough for anything remotely complex), then you have a _really_ big
problem. Yes CI is good at catching accidental changes in locking design,
but if you use it for anything more than that you're in deep trouble.

Cheers, Sima
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list