[Intel-gfx] [PATCH 02/10] drm/i915: Kick hangcheck from retire worker

Mika Kuoppala mika.kuoppala at linux.intel.com
Mon Jul 11 12:21:37 UTC 2016


Chris Wilson <chris at chris-wilson.co.uk> writes:

> Let's ensure that we cannot run indefinitely without the hangcheck
> worker being queued. We removed it from being kicked on every request
> because we were kicking it a few millions times in every hangcheck
> interval and only once is necessary! However, that leaves us with the
> issue of what if userspace never waits for a request, or runs out of
> resources, what if userspace just issues a request then spins on
> BUSY_IOCTL?
>
> Testcase: igt/gem_busy
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala at intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 7fd44980798f..adeca0ec4cfb 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3281,10 +3281,12 @@ i915_gem_retire_work_handler(struct work_struct *work)
>  	 * We do not need to do this test under locking as in the worst-case
>  	 * we queue the retire worker once too often.
>  	 */
> -	if (READ_ONCE(dev_priv->gt.awake))
> +	if (READ_ONCE(dev_priv->gt.awake)) {
> +		i915_queue_hangcheck(dev_priv);
>  		queue_delayed_work(dev_priv->wq,
>  				   &dev_priv->gt.retire_work,
>  				   round_jiffies_up_relative(HZ));
> +	}
>  }
>  
>  static void
> -- 
> 2.8.1


More information about the Intel-gfx mailing list