Re: [Intel-gfx] [PATCH v2] drm/i915: Snapshot seqno of most recently submitted request.
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@intel.com 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.harri...@intel.com Date: Mon Nov 24 18:49:40 2014 + drm/i915: Convert 'ring_idle()' to use requests not seqnos and Cc: sta...@vger.kernel.org Reviewed-by: Chris Wilson ch...@chris-wilson.co.uk -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2] drm/i915: Snapshot seqno of most recently submitted request.
On Thu, Jul 09, 2015 at 04:07:05PM +0100, Chris Wilson wrote: 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@intel.com 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.harri...@intel.com Date: Mon Nov 24 18:49:40 2014 + drm/i915: Convert 'ring_idle()' to use requests not seqnos and Cc: sta...@vger.kernel.org Reviewed-by: Chris Wilson ch...@chris-wilson.co.uk Added and applied to -fixes, thanks. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx