All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <umesh.nerlige.ramappa@intel.com>
Subject: Re: [PATCH] drm/xe: Do not wedge device on killed exec queues
Date: Tue, 24 Jun 2025 16:54:18 -0400	[thread overview]
Message-ID: <aFsQegvdaBkcIZ8n@intel.com> (raw)
In-Reply-To: <20250624174103.2707941-1-matthew.brost@intel.com>

On Tue, Jun 24, 2025 at 10:41:03AM -0700, Matthew Brost wrote:
> When a user closes an exec queue or interrupts an app with Ctrl-C,
> this does not warrant wedging the device in mode 2.
> 
> Avoid this by skipping the wedge check for killed exec queues in
> the TDR and LR exec queue cleanup worker.
> 
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_guc_submit.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index df7a5a4eec74..72477ccc5c5e 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -908,12 +908,13 @@ static void xe_guc_exec_queue_lr_cleanup(struct work_struct *w)
>  	struct xe_exec_queue *q = ge->q;
>  	struct xe_guc *guc = exec_queue_to_guc(q);
>  	struct xe_gpu_scheduler *sched = &ge->sched;
> -	bool wedged;
> +	bool wedged = false;
>  
>  	xe_gt_assert(guc_to_gt(guc), xe_exec_queue_is_lr(q));
>  	trace_xe_exec_queue_lr_cleanup(q);
>  
> -	wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
> +	if (!exec_queue_killed(q))
> +		wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
>  
>  	/* Kill the run_job / process_msg entry points */
>  	xe_sched_submission_stop(sched);
> @@ -1084,7 +1085,7 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
>  	int err = -ETIME;
>  	pid_t pid = -1;
>  	int i = 0;
> -	bool wedged, skip_timeout_check;
> +	bool wedged = false, skip_timeout_check;
>  
>  	/*
>  	 * TDR has fired before free job worker. Common if exec queue
> @@ -1130,7 +1131,8 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
>  	 * doesn't work for SRIOV. For now assuming timeouts in wedged mode are
>  	 * genuine timeouts.
>  	 */
> -	wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
> +	if (!exec_queue_killed(q))
> +		wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
>  
>  	/* Engine state now stable, disable scheduling to check timestamp */
>  	if (!wedged && exec_queue_registered(q)) {
> -- 
> 2.34.1
> 

  parent reply	other threads:[~2025-06-24 20:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 17:41 [PATCH] drm/xe: Do not wedge device on killed exec queues Matthew Brost
2025-06-24 19:24 ` ✓ CI.KUnit: success for " Patchwork
2025-06-24 20:26 ` ✓ Xe.CI.BAT: " Patchwork
2025-06-24 20:54 ` Rodrigo Vivi [this message]
2025-06-25 16:50 ` ✗ Xe.CI.Full: 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=aFsQegvdaBkcIZ8n@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=umesh.nerlige.ramappa@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 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.