Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stuart Summers <stuart.summers@intel.com>
Cc: matthew.brost@intel.com, rodrigo.vivi@intel.com,
	michal.mrozek@intel.com, fei.yang@intel.com,
	daniel.charles@intel.com, intel-xe@lists.freedesktop.org,
	Stuart Summers <stuart.summers@intel.com>
Subject: [PATCH] drm/xe: Document exec queue priority rules
Date: Mon, 23 Feb 2026 21:24:42 +0000	[thread overview]
Message-ID: <20260223212442.8923-1-stuart.summers@intel.com> (raw)

Add some documentation around how the GuC will employ
the xe_exec_queue priorities provided by userspace
application.

Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 drivers/gpu/drm/xe/xe_exec_queue_types.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_exec_queue_types.h b/drivers/gpu/drm/xe/xe_exec_queue_types.h
index 3791fed34ffa..aefebfc6996e 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue_types.h
+++ b/drivers/gpu/drm/xe/xe_exec_queue_types.h
@@ -22,6 +22,30 @@ struct xe_guc_exec_queue;
 struct xe_hw_engine;
 struct xe_vm;
 
+/**
+ * enum xe_exec_queue_priority - Exec Queue priority values
+ *
+ * XeKMD uses GuC as the primary submission vehicle to HW.
+ * GuC has 4 priority levels that roughly map to the 4 levels
+ * shown here but in reverse order. GuC scheduler uses time
+ * slicing to determine how long a queue should remain on the
+ * command streamer before issuing a preemption request to
+ * allow execution of another queue.
+ *
+ * The following rules should be considered by applications
+ * employing these queue priorities:
+ *  - A HIGH priority request will preempt a NORMAL and LOW
+ *    priority request when submitted and based on the time
+ *    slice quantum.
+ *  - A NORMAL priority request will preempt a LOW priority
+ *    request when submitted and based on that time slice
+ *    quantum but will not preempt a HIGH priority request
+ *    until that time slice quantum has been reached.
+ *  - A LOW priority request will never preempt either a
+ *    MEDIUM or HIGH priority context.
+ *  - Currently KERNEL level priority is reserved, as the name
+ *    suggests, for kernel-submitted queues only.
+ */
 enum xe_exec_queue_priority {
 	XE_EXEC_QUEUE_PRIORITY_UNSET = -2, /* For execlist usage only */
 	XE_EXEC_QUEUE_PRIORITY_LOW = 0,
-- 
2.34.1


             reply	other threads:[~2026-02-23 21:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 21:24 Stuart Summers [this message]
2026-02-23 21:31 ` ✓ CI.KUnit: success for drm/xe: Document exec queue priority rules Patchwork
2026-02-23 21:35 ` Daniel Charles
2026-02-23 21:39 ` [PATCH] " Matthew Brost
2026-02-23 21:56   ` Summers, Stuart
2026-02-23 22:04     ` Matthew Brost
2026-02-23 22:28       ` Summers, Stuart

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=20260223212442.8923-1-stuart.summers@intel.com \
    --to=stuart.summers@intel.com \
    --cc=daniel.charles@intel.com \
    --cc=fei.yang@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=michal.mrozek@intel.com \
    --cc=rodrigo.vivi@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