[Intel-gfx] [PATCH] drm/i915: Remove bogus locking check in the hangcheck code

Daniel Vetter daniel at ffwll.ch
Tue Feb 3 03:09:47 PST 2015


On Tue, Feb 03, 2015 at 10:50:27AM +0000, Chris Wilson wrote:
> On Tue, Feb 03, 2015 at 11:49:00AM +0100, Daniel Vetter wrote:
> > Aside: It is possible to check whether a given task doesn't hold a
> > lock, but only when lockdep is enabled, using the lockdep_assert_held
> > stuff.
> 
> Bah. That's what I said, but a certain Daniel insists on using WARN_ON().

That is for the inverse check which warns when the lock is not taking,
i.e. WARN_ON(!mutex_is_locked). lockdep_assert_held would be more
accurate but also won't work at all if disabled. We run single-threaded by
accident often enough that the reduced practical coverage trumps the
reduced theoretical coverage imo.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Intel-gfx mailing list