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: Distinguish last emitted request from last submitted request
Date: Thu, 06 Oct 2016 10:56:32 +0300 [thread overview]
Message-ID: <87lgy13o7j.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20161005200558.6558-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> In order not to trigger hangcheck on a idle-but-waiting engine, we need
> to distinguish between the pending request queue and the actual
> execution queue. This is done later in "drm/i915: Enable multiple
> timelines" but for now we need a temporary fix to prevent blaming the
> wrong engine for a GPU hang.
>
You described this as a hack, but on top of current nightly,
this doesn't seem so hackish at all.
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> Fixes: 0a046a0e93d2 ("drm/i915: Nonblocking request submission")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_request.c | 5 +++--
> drivers/gpu/drm/i915/intel_ringbuffer.h | 1 +
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 40978bc12ceb..8832f8ec1583 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -328,6 +328,7 @@ submit_notify(struct i915_sw_fence *fence, enum i915_sw_fence_notify state)
>
> switch (state) {
> case FENCE_COMPLETE:
> + request->engine->last_submitted_seqno = request->fence.seqno;
> request->engine->submit_request(request);
> break;
>
> @@ -641,8 +642,8 @@ void __i915_add_request(struct drm_i915_gem_request *request, bool flush_caches)
> &request->submitq);
>
> request->emitted_jiffies = jiffies;
> - request->previous_seqno = engine->last_submitted_seqno;
> - engine->last_submitted_seqno = request->fence.seqno;
> + request->previous_seqno = engine->last_pending_seqno;
> + engine->last_pending_seqno = request->fence.seqno;
> i915_gem_active_set(&engine->last_request, request);
> list_add_tail(&request->link, &engine->request_list);
> list_add_tail(&request->ring_link, &ring->request_list);
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index 498931f0b1f1..34954ca03a4a 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -355,6 +355,7 @@ struct intel_engine_cs {
> * inspecting request list.
> */
> u32 last_submitted_seqno;
> + u32 last_pending_seqno;
>
> /* An RCU guarded pointer to the last request. No reference is
> * held to the request, users must carefully acquire a reference to
> --
> 2.9.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-10-06 7:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-05 20:05 [PATCH] drm/i915: Distinguish last emitted request from last submitted request Chris Wilson
2016-10-05 20:49 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-10-06 6:57 ` [PATCH] " Joonas Lahtinen
2016-10-06 7:02 ` Chris Wilson
2016-10-06 7:56 ` Mika Kuoppala [this message]
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=87lgy13o7j.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.