On Thu, Jul 09, 2015 at 03:30:57PM +0100, Tomas Elf wrote: > The hang checker needs to inspect whether or not the ring request list is empty > as well as if the given engine has reached or passed the most recently > submitted request. The problem with this is that the hang checker cannot grab > the struct_mutex, which is required in order to safely inspect requests since > requests might be deallocated during inspection. In the past we've had kernel > panics due to this very unsynchronized access in the hang checker. > > One solution to this problem is to not inspect the requests directly since > we're only interested in the seqno of the most recently submitted request - not > the request itself. Instead the seqno of the most recently submitted request is > stored separately, which the hang checker then inspects, circumventing the > issue of synchronization from the hang checker entirely. > > v2 (Chris Wilson): > - Pass current engine seqno to ring_idle() from i915_hangcheck_elapsed() rather > than compute it over again. > - Remove extra whitespace. > > Issue: VIZ-5998 > Signed-off-by: Tomas Elf <tomas.elf@xxxxxxxxx> Yup, that is a nice simple fix by partially reverting the s/seqno/requests/ change (and improving upon it in the process). We should mention Fixes commit 44cdd6d219bc64f6810b8ed0023a4d4db9e0fe68 Author: John Harrison <John.C.Harrison@xxxxxxxxx> Date: Mon Nov 24 18:49:40 2014 +0000 drm/i915: Convert 'ring_idle()' to use requests not seqnos and Cc: stable@xxxxxxxxxxxxxxx Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx