Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, alex.zuo@intel.com,
	jonathan.cavitt@intel.com, stuart.summers@intel.com,
	matthew.brost@intel.com
Subject: [PATCH] drm/xe/xe_guc_submit: Check all long-running exec queues on stop
Date: Tue,  7 Oct 2025 21:55:51 +0000	[thread overview]
Message-ID: <20251007215550.141304-2-jonathan.cavitt@intel.com> (raw)

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.

Fixes: abdea2847acf ("drm/xe/xe_guc_submit: Allow lr exec queues to be banned")
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


             reply	other threads:[~2025-10-07 21:55 UTC|newest]

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