From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 01/10] drm/i915/breadcrumbs: Queue hangcheck before sleeping
Date: Mon, 11 Jul 2016 14:42:28 +0300 [thread overview]
Message-ID: <87mvlotn8b.fsf@intel.com> (raw)
In-Reply-To: <1468055535-19740-2-git-send-email-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Never go to sleep waiting on the GPU without first ensuring that we will
> get woken up.
>
> We have a choice of queuing the hangcheck before every schedule() or the
> first time we wakeup. In order to simply accommodate both the signaler
> and the ordinary waiter, move the queuing to the common point of
> enabling the irq. We lose the paranoid safety of ensuring that the
> hangcheck is active before the sleep, but avoid code duplication (and
> redundant hangcheck queuing).
>
> Testcase: igt/prime_busy
> Fixes: c81d46138da6 ("drm/i915: Convert trace-irq to the breadcrumb waiter")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 9 ---------
> drivers/gpu/drm/i915/intel_breadcrumbs.c | 9 +++++++++
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 8f50919ba9b4..7fd44980798f 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1501,15 +1501,6 @@ int __i915_wait_request(struct drm_i915_gem_request *req,
> break;
> }
>
> - /* Ensure that even if the GPU hangs, we get woken up.
> - *
> - * However, note that if no one is waiting, we never notice
> - * a gpu hang. Eventually, we will have to wait for a resource
> - * held by the GPU and so trigger a hangcheck. In the most
> - * pathological case, this will be upon memory starvation!
> - */
> - i915_queue_hangcheck(req->i915);
> -
> timeout_remain = io_schedule_timeout(timeout_remain);
> if (timeout_remain == 0) {
> ret = -ETIME;
> diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> index d89b2c963618..b074f3d6d127 100644
> --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> @@ -93,6 +93,15 @@ static void __intel_breadcrumbs_enable_irq(struct intel_breadcrumbs *b)
> if (!b->irq_enabled ||
> test_bit(engine->id, &i915->gpu_error.missed_irq_rings))
> mod_timer(&b->fake_irq, jiffies + 1);
> +
> + /* Ensure that even if the GPU hangs, we get woken up.
> + *
> + * However, note that if no one is waiting, we never notice
> + * a gpu hang. Eventually, we will have to wait for a resource
> + * held by the GPU and so trigger a hangcheck. In the most
> + * pathological case, this will be upon memory starvation!
> + */
> + i915_queue_hangcheck(i915);
> }
>
> static void __intel_breadcrumbs_disable_irq(struct intel_breadcrumbs *b)
> --
> 2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-07-11 11:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-09 9:12 Mika's rps/rc6 fixes Chris Wilson
2016-07-09 9:12 ` [PATCH 01/10] drm/i915/breadcrumbs: Queue hangcheck before sleeping Chris Wilson
2016-07-11 11:42 ` Mika Kuoppala [this message]
2016-07-09 9:12 ` [PATCH 02/10] drm/i915: Kick hangcheck from retire worker Chris Wilson
2016-07-11 12:21 ` Mika Kuoppala
2016-07-11 12:46 ` Chris Wilson
2016-07-09 9:12 ` [PATCH 03/10] drm/i915: Preserve current RPS frequency across init Chris Wilson
2016-07-09 9:12 ` [PATCH 04/10] drm/i915: Perform static RPS frequency setup before userspace Chris Wilson
2016-07-11 13:31 ` Mika Kuoppala
2016-07-09 9:12 ` [PATCH 05/10] drm/i915: Move overclocking detection to alongside RPS frequency detection Chris Wilson
2016-07-11 13:37 ` Mika Kuoppala
2016-07-09 9:12 ` [PATCH 06/10] drm/i915: Define a separate variable and control for RPS waitboost frequency Chris Wilson
2016-07-11 11:39 ` Mika Kuoppala
2016-07-11 11:49 ` Chris Wilson
2016-07-11 12:55 ` Mika Kuoppala
2016-07-11 13:09 ` Chris Wilson
2016-07-09 9:12 ` [PATCH 07/10] drm/i915: Remove superfluous powersave work flushing Chris Wilson
2016-07-11 14:11 ` Mika Kuoppala
2016-07-09 9:12 ` [PATCH 08/10] drm/i915: Defer enabling rc6 til after we submit the first batch/context Chris Wilson
2016-07-11 14:14 ` Mika Kuoppala
2016-07-11 14:24 ` Chris Wilson
2016-07-09 9:12 ` [PATCH 09/10] drm/i915: Hide gen6_update_ring_freq() Chris Wilson
2016-07-09 9:12 ` [PATCH 10/10] drm/i915: Remove temporary RPM wakeref assert disables Chris Wilson
2016-07-11 15:30 ` Mika Kuoppala
2016-07-09 9:58 ` ✗ Ro.CI.BAT: failure for series starting with [01/10] drm/i915/breadcrumbs: Queue hangcheck before sleeping Patchwork
2016-07-09 10:08 ` 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=87mvlotn8b.fsf@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox