From: Matthew Brost <matthew.brost@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Convert kernel job timeout from assert to warning
Date: Tue, 30 Jan 2024 19:22:53 +0000 [thread overview]
Message-ID: <ZblMjdTJdlj44026@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240130180452.1416603-2-matthew.d.roper@intel.com>
On Tue, Jan 30, 2024 at 10:04:53AM -0800, Matt Roper wrote:
> xe_assert() is intended to be used only for "impossible" situations that
> should never be hit (and if they are hit it means there's a driver bug
> somewhere); assertions are only compiled into debug builds.
>
> Although we expect jobs submitted by the kernel to be well-behaved and
> run without error, timeouts are a legitimate possibility for reasons
> beyond our control (bad firmware, flaky hardware, etc.). We should use
> a real WARN if we encounter these, even for non-debug builds, to ensure
> the issue is being properly highlighted in bug reports and such.
>
> Also give the WARN a more human-readable message and move it below the
> general notice-level message that gets printed for any kind of timeout
> to make the errors a bit more understandable.
>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_submit.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 2b008ec1b6de..4efc9601e050 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -23,6 +23,7 @@
> #include "xe_force_wake.h"
> #include "xe_gpu_scheduler.h"
> #include "xe_gt.h"
> +#include "xe_gt_printk.h"
> #include "xe_guc.h"
> #include "xe_guc_ct.h"
> #include "xe_guc_exec_queue_types.h"
> @@ -928,11 +929,12 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
> int i = 0;
>
> if (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &job->fence->flags)) {
> - xe_assert(xe, !(q->flags & EXEC_QUEUE_FLAG_KERNEL));
> xe_assert(xe, !(q->flags & EXEC_QUEUE_FLAG_VM && !exec_queue_killed(q)));
The above condition should also be converted to warn, I had a patch for
this too [1] but prefer yours. Want to post a follow up with this
converted to a warn too?
With that:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
[1] https://patchwork.freedesktop.org/series/128408/
>
> 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");
> simple_error_capture(q);
> xe_devcoredump(job);
> } else {
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-01-30 19:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 18:04 [PATCH] drm/xe: Convert kernel job timeout from assert to warning Matt Roper
2024-01-30 19:22 ` Matthew Brost [this message]
2024-01-30 23:29 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-30 23:29 ` ✓ CI.checkpatch: " Patchwork
2024-01-30 23:30 ` ✓ CI.KUnit: " Patchwork
2024-01-30 23:37 ` ✓ CI.Build: " Patchwork
2024-01-30 23:37 ` ✓ CI.Hooks: " Patchwork
2024-01-30 23:39 ` ✓ CI.checksparse: " Patchwork
2024-01-31 0:23 ` ✓ CI.BAT: " 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=ZblMjdTJdlj44026@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@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