All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Don't continually defer the hangcheck
Date: Wed, 19 Nov 2014 12:43:05 +0200	[thread overview]
Message-ID: <871tozbhdy.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <1416390439-5724-1-git-send-email-chris@chris-wilson.co.uk>

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

> With multiple rings, we may continue to render on the blitter whilst
> executing an infinite shader on the render ring. As we currently, rearm
> the timer with each execbuf, in this scenario the hangcheck will never
> fire and we will never detect the lockup on the render ring. Instead,
> only arm the timer once per hangcheck, so that hangcheck runs more
> frequently.
>
> v2: Rearrange code to avoid triggering a BUG_ON in add_timer from
> softirq context.
>
> Testcase: igt/gem_reset_stats/defer-hangcheck*
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86225
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---

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

>  drivers/gpu/drm/i915/i915_irq.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 729e9a329f76..c88c005433d6 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -988,7 +988,6 @@ static void notify_ring(struct drm_device *dev,
>  	trace_i915_gem_request_complete(ring);
>  
>  	wake_up_all(&ring->irq_queue);
> -	i915_queue_hangcheck(dev);
>  }
>  
>  static u32 vlv_c0_residency(struct drm_i915_private *dev_priv,
> @@ -3035,11 +3034,15 @@ static void i915_hangcheck_elapsed(unsigned long data)
>  void i915_queue_hangcheck(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> +	struct timer_list *timer = &dev_priv->gpu_error.hangcheck_timer;
> +
>  	if (!i915.enable_hangcheck)
>  		return;
>  
> -	mod_timer(&dev_priv->gpu_error.hangcheck_timer,
> -		  round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES));
> +	/* Don't continually defer the hangcheck, but make sure it is active */
> +	if (!timer_pending(timer))
> +		timer->expires = round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES);
> +	mod_timer(timer, timer->expires);
>  }
>  
>  static void ibx_irq_reset(struct drm_device *dev)
> -- 
> 2.1.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-11-19 10:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19  9:47 [PATCH] drm/i915: Don't continually defer the hangcheck Chris Wilson
2014-11-19 10:43 ` Mika Kuoppala [this message]
2014-11-19 10:45 ` Daniel Vetter
2014-11-19 17:05 ` shuang.he
  -- strict thread matches above, loose matches on Subject: below --
2014-11-07  9:47 Chris Wilson
2014-11-07 14:28 ` Mika Kuoppala
2014-11-07 14:35   ` Chris Wilson
2014-11-07 15:14     ` Mika Kuoppala
2014-11-19 10:00       ` Daniel Vetter
2014-11-19 10:13         ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tozbhdy.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.