From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH] drm/i915: Only call mod_timer() if not already pending
Date: Thu, 20 Nov 2014 22:49:13 +0100 [thread overview]
Message-ID: <20141120214913.GL25711@phenom.ffwll.local> (raw)
In-Reply-To: <1416514233-4855-1-git-send-email-chris@chris-wilson.co.uk>
On Thu, Nov 20, 2014 at 08:10:33PM +0000, Chris Wilson wrote:
> The final arrangement of updating timer->expires and calling mod_timer()
> used in
>
> commit 672e7b7c1849c904b2c55185906b3940843c55c6
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date: Wed Nov 19 09:47:19 2014 +0000
>
> drm/i915: Don't continually defer the hangcheck
>
> turns out to be very unsafe. Try again.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 8d169e152d1e..5908580d7c15 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -3067,9 +3067,10 @@ void i915_queue_hangcheck(struct drm_device *dev)
> return;
>
> /* 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);
> + if (timer_pending(timer))
> + return;
> + mod_timer(timer,
> + round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES));
Oops. And that one now is before the merge, so no history rectifying.
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-11-20 21:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 20:10 [PATCH] drm/i915: Only call mod_timer() if not already pending Chris Wilson
2014-11-20 21:49 ` Daniel Vetter [this message]
2014-11-22 20:20 ` [PATCH] drm/i915: Only call mod_timer() if not already shuang.he
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=20141120214913.GL25711@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox