Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/xe_guc_submit: Check all long-running exec queues on stop
@ 2025-10-07 21:55 Jonathan Cavitt
  2025-10-07 22:57 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jonathan Cavitt @ 2025-10-07 21:55 UTC (permalink / raw)
  To: intel-xe
  Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt, stuart.summers,
	matthew.brost

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-08  1:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH] " Matthew Brost
2025-10-08  1:42 ` ✗ Xe.CI.Full: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox