From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Brost, Matthew" <matthew.brost@intel.com>
Cc: "thomas.hellstrom@linux.intel.com" <thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH] drm/xe/guc: Handle timing out of signaled jobs gracefully
Date: Mon, 26 Feb 2024 14:57:41 +0000 [thread overview]
Message-ID: <35cc6d5ef57b3f814ddd47672072cb21c6abf206.camel@intel.com> (raw)
In-Reply-To: <20240223204659.40750-1-matthew.brost@intel.com>
On Fri, 2024-02-23 at 12:46 -0800, Matthew Brost wrote:
> Timing out of signaled jobs can happen during regular operations (e.g.
> an exec queue closed immediately after last fence signaled). The TDR can
> pass the worker which free jobs. Rather than running through the TDR if
> signaled job is found, simply free it without any debug messages.
thank you
Tested-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Reported-by: José Roberto de Souza <jose.souza@intel.com>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1271
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_submit.c | 32 ++++++++++++++++++------------
> 1 file changed, 19 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index ff77bc8da1b2..29748e40555f 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -929,20 +929,26 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
> int err = -ETIME;
> int i = 0;
>
> - if (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &job->fence->flags)) {
> - drm_notice(&xe->drm, "Timedout job: seqno=%u, guc_id=%d, flags=0x%lx",
> - xe_sched_job_seqno(job), q->guc->id, q->flags);
> - xe_gt_WARN(q->gt, q->flags & EXEC_QUEUE_FLAG_KERNEL,
> - "Kernel-submitted job timed out\n");
> - xe_gt_WARN(q->gt, q->flags & EXEC_QUEUE_FLAG_VM && !exec_queue_killed(q),
> - "VM job timed out on non-killed execqueue\n");
> -
> - simple_error_capture(q);
> - xe_devcoredump(job);
> - } else {
> - drm_dbg(&xe->drm, "Timedout signaled job: seqno=%u, guc_id=%d, flags=0x%lx",
> - xe_sched_job_seqno(job), q->guc->id, q->flags);
> + /*
> + * TDR has fired before free job worker. Common if exec queue
> + * immediately closed after last fence signaled.
> + */
> + if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &job->fence->flags)) {
> + guc_exec_queue_free_job(drm_job);
> +
> + return DRM_GPU_SCHED_STAT_NOMINAL;
> }
> +
> + drm_notice(&xe->drm, "Timedout job: seqno=%u, guc_id=%d, flags=0x%lx",
> + xe_sched_job_seqno(job), q->guc->id, q->flags);
> + xe_gt_WARN(q->gt, q->flags & EXEC_QUEUE_FLAG_KERNEL,
> + "Kernel-submitted job timed out\n");
> + xe_gt_WARN(q->gt, q->flags & EXEC_QUEUE_FLAG_VM && !exec_queue_killed(q),
> + "VM job timed out on non-killed execqueue\n");
> +
> + simple_error_capture(q);
> + xe_devcoredump(job);
> +
> trace_xe_sched_job_timedout(job);
>
> /* Kill the run_job entry point */
prev parent reply other threads:[~2024-02-26 14:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 20:46 [PATCH] drm/xe/guc: Handle timing out of signaled jobs gracefully Matthew Brost
2024-02-23 20:55 ` ✓ CI.Patch_applied: success for " Patchwork
2024-02-23 20:55 ` ✓ CI.checkpatch: " Patchwork
2024-02-23 20:56 ` ✓ CI.KUnit: " Patchwork
2024-02-23 21:07 ` ✓ CI.Build: " Patchwork
2024-02-23 21:08 ` ✓ CI.Hooks: " Patchwork
2024-02-23 21:09 ` ✓ CI.checksparse: " Patchwork
2024-02-23 21:29 ` ✓ CI.BAT: " Patchwork
2024-02-26 9:26 ` [PATCH] " Thomas Hellström
2024-02-26 20:20 ` Matthew Brost
2024-02-26 14:57 ` Souza, Jose [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=35cc6d5ef57b3f814ddd47672072cb21c6abf206.camel@intel.com \
--to=jose.souza@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=thomas.hellstrom@linux.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