Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <saurabhg.gupta@intel.com>,
	<alex.zuo@intel.com>, <stuart.summers@intel.com>
Subject: Re: [PATCH] drm/xe/xe_guc_submit: Check all long-running exec queues on stop
Date: Tue, 7 Oct 2025 17:56:45 -0700	[thread overview]
Message-ID: <aOW2zb85dsxSABfm@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20251007215550.141304-2-jonathan.cavitt@intel.com>

On Tue, Oct 07, 2025 at 09:55:51PM +0000, Jonathan Cavitt wrote:
> In guc_exec_queue_stop, the target exec queue is banned when one of the
> following conditions is true:
> 
> - The exec queue has a job that has started but not completed.
> - The exec queue has a job that has experienced more than two GT resets.
> - The exec queue is long-running, and the LRC is NOT idle.
> 
> Notably, the last condition is not mutually-exclusive from the first
> two.  However, we use an else-if to determine the last condition only if
> the exec queue does not have a first scheduled job.  This means that if
> the exec queue:
> 
> - Is long-running,
> - Has an LRC that is NOT idle,
> - Has a job that has not yet started, and
> - Said job has not experienced more than two GT resets,
> 
> The exec queue will NOT be banned.
> 
> The check used to make sense when long-running exec queues weren't
> allowed to have jobs, but this is no longer the case, so we no longer
> want to else-if here.

The above change hasn't merged yet but likely will in the next couple of
days, so if anything this should be included in that change.

> 
> Fixes: abdea2847acf ("drm/xe/xe_guc_submit: Allow lr exec queues to be banned")

What motivating this change / why do you think this requires a fixes?

I don't think we really have a UMD contract with GT resets other than we
do our best to restore everything to a working state. In practice, GT
resets should never occur unless we have KMD, GuC, or HW bug. With all
of this, I think it is perfectly fine once we a job list for LR queues
we attempt to resubmit the jobs.

Matt

> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Stuart Summers <stuart.summers@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_submit.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 16f78376f196..86b96d7e58e9 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -1839,11 +1839,12 @@ static void guc_exec_queue_stop(struct xe_guc *guc, struct xe_exec_queue *q)
>  				trace_xe_sched_job_ban(job);
>  				ban = true;
>  			}
> -		} else if (xe_exec_queue_is_lr(q) &&
> -			   !xe_lrc_ring_is_idle(q->lrc[0])) {
> -			ban = true;
>  		}
>  
> +		if (xe_exec_queue_is_lr(q) &&
> +		    !xe_lrc_ring_is_idle(q->lrc[0]))
> +			ban = true;
> +
>  		if (ban) {
>  			set_exec_queue_banned(q);
>  			xe_guc_exec_queue_trigger_cleanup(q);
> -- 
> 2.43.0
> 

  parent reply	other threads:[~2025-10-08  0:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 21:55 [PATCH] drm/xe/xe_guc_submit: Check all long-running exec queues on stop Jonathan Cavitt
2025-10-07 22:57 ` ✓ CI.KUnit: success for " Patchwork
2025-10-07 23:34 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-08  0:56 ` Matthew Brost [this message]
2025-10-08  1:42 ` ✗ 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=aOW2zb85dsxSABfm@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=saurabhg.gupta@intel.com \
    --cc=stuart.summers@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