All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] drm/xe: balance exec queue suspend/resume
@ 2026-07-13  3:00 Niranjana Vishwanathapura
  2026-07-13  3:00 ` [PATCH v4 1/6] drm/xe: only resume exec queues that were actually suspended Niranjana Vishwanathapura
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Niranjana Vishwanathapura @ 2026-07-13  3:00 UTC (permalink / raw)
  To: intel-xe; +Cc: matthew.brost, thomas.hellstrom

This series fixes and hardens the exec queue suspend/resume balance in
the Xe driver, and builds on that to make multi-queue group suspend
actually preempt the group's GuC context.

Today a consumer that suspends an exec queue (preempt fences, the hw
engine group fault-mode switch, ...) unconditionally issues the
matching resume(), even when the suspend() never took effect because the
queue was killed, banned or wedged in the meantime. Resuming a queue
that was never suspended is incorrect: with the GuC backend it can trip
the !suspend_pending assertion or leave scheduling state inconsistent.

The series addresses this in layers:

 - Track whether a consumer's suspend() actually succeeded and only
   issue resume() when one is owed (patch 1), and apply the same
   discipline to the hw engine group fault-mode switch, including
   undoing partial suspends on failure (patch 4).

 - Harden the GuC suspend wait so a GuC timeout bans the queue or the
   multi-queue group and tears it down instead of leaving it suspended
   forever (patch 2).

 - Add uninterruptible suspend wait support for cleanup/undo paths
   that must complete a suspend on behalf of a queue that may belong to a
   different process without causing cross-process DOS (patch 3)

 - Add a suspend reference count to the exec queue ops so overlapping
   suspends from independent callers stay balanced (patch 5).

 - Use that refcount to forward a multi-queue secondary's suspend to the
   group's primary, so suspending a secondary actually disables the
   primary's GuC context and preempts the group's in-flight GPU work
   (patch 6).

v2: In suspend_wait(), add additional comment and ban whole group
    upon error.
v3: Refactor patches, add suspend_wait_blocking(), revert to interruptible
    wait in suspend_wait(), don't let a dying queue block the switch,
    update comments.
v4: Do not suspend a secondary if primary is killed,
    wait for primay suspend to complete before drop_suspend()

Assisted-by: Github-Copilot:Claude-opus-4.8
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>

Niranjana Vishwanathapura (5):
  drm/xe: only resume exec queues that were actually suspended
  drm/xe/guc: ban exec queue on suspend timeout
  drm/xe/guc: add uninterruptible suspend wait for cross-process cleanup
  drm/xe/hw_engine_group: propagate suspend failures during mode switch
  drm/xe/multi_queue: preempt primary on queue group suspend

Thomas Hellström (1):
  drm/xe/guc: Add suspend refcount to exec queue ops

 drivers/gpu/drm/xe/xe_exec_queue.c           |   1 +
 drivers/gpu/drm/xe/xe_exec_queue_types.h     |  27 ++
 drivers/gpu/drm/xe/xe_execlist.c             |   1 +
 drivers/gpu/drm/xe/xe_guc_exec_queue_types.h |   7 +
 drivers/gpu/drm/xe/xe_guc_submit.c           | 274 +++++++++++++++++--
 drivers/gpu/drm/xe/xe_hw_engine_group.c      |  85 +++++-
 drivers/gpu/drm/xe/xe_preempt_fence.c        |   7 +
 drivers/gpu/drm/xe/xe_vm.c                   |  18 +-
 8 files changed, 398 insertions(+), 22 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-07-13 16:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13  3:00 [PATCH v4 0/6] drm/xe: balance exec queue suspend/resume Niranjana Vishwanathapura
2026-07-13  3:00 ` [PATCH v4 1/6] drm/xe: only resume exec queues that were actually suspended Niranjana Vishwanathapura
2026-07-13  3:00 ` [PATCH v4 2/6] drm/xe/guc: ban exec queue on suspend timeout Niranjana Vishwanathapura
2026-07-13 16:15   ` Matthew Brost
2026-07-13  3:00 ` [PATCH v4 3/6] drm/xe/guc: add uninterruptible suspend wait for cross-process cleanup Niranjana Vishwanathapura
2026-07-13 16:17   ` Matthew Brost
2026-07-13  3:00 ` [PATCH v4 4/6] drm/xe/hw_engine_group: propagate suspend failures during mode switch Niranjana Vishwanathapura
2026-07-13 16:20   ` Matthew Brost
2026-07-13  3:00 ` [PATCH v4 5/6] drm/xe/guc: Add suspend refcount to exec queue ops Niranjana Vishwanathapura
2026-07-13  3:00 ` [PATCH v4 6/6] drm/xe/multi_queue: preempt primary on queue group suspend Niranjana Vishwanathapura
2026-07-13  3:06 ` ✗ CI.checkpatch: warning for drm/xe: balance exec queue suspend/resume (rev6) Patchwork
2026-07-13  3:07 ` ✓ CI.KUnit: success " Patchwork
2026-07-13  3:43 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-13  4:52 ` ✓ Xe.CI.FULL: " Patchwork

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.