From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: John.C.Harrison@Intel.com, Intel-GFX@Lists.FreeDesktop.Org
Cc: DRI-Devel@Lists.FreeDesktop.Org
Subject: Re: [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: Look for a guilty context when an engine reset fails
Date: Wed, 18 Jan 2023 16:37:59 +0000 [thread overview]
Message-ID: <b3653882-6bb9-86d8-4b49-d2ca18aa8831@linux.intel.com> (raw)
In-Reply-To: <20230117213630.2897570-5-John.C.Harrison@Intel.com>
On 17/01/2023 21:36, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
>
> Engine resets are supposed to never fail. But in the case when one
> does (due to unknown reasons that normally come down to a missing
> w/a), it is useful to get as much information out of the system as
> possible. Given that the GuC effectively dies on such a situation, it
> is not possible to get a guilty context notification back. So do a
> manual search instead. Given that GuC is dead, this is safe because
> GuC won't be changing the engine state asynchronously.
>
> v2: Change comment to be less alarming (Tvrtko)
>
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> ---
> .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index 3b34a82d692be..9bc80b807dbcc 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -4754,11 +4754,24 @@ static void reset_fail_worker_func(struct work_struct *w)
> guc->submission_state.reset_fail_mask = 0;
> spin_unlock_irqrestore(&guc->submission_state.lock, flags);
>
> - if (likely(reset_fail_mask))
> + if (likely(reset_fail_mask)) {
> + struct intel_engine_cs *engine;
> + enum intel_engine_id id;
> +
> + /*
> + * GuC is toast at this point - it dead loops after sending the failed
> + * reset notification. So need to manually determine the guilty context.
> + * Note that it should be reliable to do this here because the GuC is
> + * toast and will not be scheduling behind the KMD's back.
> + */
> + for_each_engine_masked(engine, gt, reset_fail_mask, id)
> + intel_guc_find_hung_context(engine);
> +
> intel_gt_handle_error(gt, reset_fail_mask,
> I915_ERROR_CAPTURE,
> - "GuC failed to reset engine mask=0x%x\n",
> + "GuC failed to reset engine mask=0x%x",
> reset_fail_mask);
> + }
> }
>
> int intel_guc_engine_failure_process_msg(struct intel_guc *guc,
Assuming 1/5 gets blessed by GuC experts this would then look safe to:
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
next prev parent reply other threads:[~2023-01-18 16:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 21:36 [Intel-gfx] [PATCH v2 0/5] Allow error capture without a request / on reset failure John.C.Harrison
2023-01-17 21:36 ` [Intel-gfx] [PATCH v2 1/5] drm/i915: Fix request locking during error capture & debugfs dump John.C.Harrison
2023-01-18 8:29 ` Andy Shevchenko
2023-01-18 17:34 ` John Harrison
2023-01-18 17:54 ` Andy Shevchenko
2023-01-18 18:18 ` John Harrison
2023-01-18 16:22 ` Tvrtko Ursulin
2023-01-18 17:55 ` John Harrison
2023-01-17 21:36 ` [Intel-gfx] [PATCH v2 2/5] drm/i915: Allow error capture without a request John.C.Harrison
2023-01-18 16:34 ` Tvrtko Ursulin
2023-01-17 21:36 ` [Intel-gfx] [PATCH v2 3/5] drm/i915: Allow error capture of a pending request John.C.Harrison
2023-01-18 16:35 ` Tvrtko Ursulin
2023-01-17 21:36 ` [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: Look for a guilty context when an engine reset fails John.C.Harrison
2023-01-18 16:37 ` Tvrtko Ursulin [this message]
2023-01-17 21:36 ` [Intel-gfx] [PATCH v2 5/5] drm/i915/guc: Add a debug print on GuC triggered reset John.C.Harrison
2023-01-17 22:55 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Allow error capture without a request / on reset failure (rev3) Patchwork
2023-01-17 22:55 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-01-17 23:05 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
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=b3653882-6bb9-86d8-4b49-d2ca18aa8831@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=DRI-Devel@Lists.FreeDesktop.Org \
--cc=Intel-GFX@Lists.FreeDesktop.Org \
--cc=John.C.Harrison@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