Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] FD close cleanup for XE
@ 2026-11-19  0:04 Daniel Charles
  2026-11-19  0:04 ` [PATCH v5 1/4] drm/xe: Read scheduler message opcode under lock Daniel Charles
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Daniel Charles @ 2026-11-19  0:04 UTC (permalink / raw)
  To: intel-xe; +Cc: x.wang, jia.yao, matthew.brost, jonathan.cavitt, Daniel Charles

On FD close, serialized TDR cleanup can lag behind VM teardown. GuC
may continue scheduling contexts while their page tables are being
torn down, leading to CAT errors and repeated engine resets.

This series keeps the early scheduling disable outside the serialized
TDR path and makes FD close wait before releasing queue references.
FD close first kills all queues, then waits for each queue before
dropping its reference.

Changes since v4:
 - Patch 1 is unchanged.
 - Patch 2 adds per-queue scheduling-state waitqueues as a standalone
   prerequisite. SCHED_DONE wakes waiters on the affected queue after
   updating its state, without waking unrelated CT waiters.
 - Patch 3 restricts early group DISABLE to the primary's own KILL.
   It also allows pending disable on a killed queue in run_job and
   avoids issuing a second DISABLE from TDR if KILL already disabled
   scheduling.
 - Patch 4 requires a KILL acknowledgement before accepting a disabled
   scheduling state, so FD close cannot finish the wait before KILL
   runs. Multi-queue members wait for their primary's acknowledgement
   and scheduling state on its per-queue waitqueue, replacing the
   shared kill_wq from v4.


v4: https://patchwork.freedesktop.org/series/175996/#rev4

Daniel Charles (2):
  drm/xe: Notify scheduling-state waiters per exec queue
  drm/xe: Synchronously wait for queue kill on FD close

Matthew Brost (2):
  drm/xe: Read scheduler message opcode under lock
  drm/xe: Disable scheduling early on FD close to avoid CAT error
    cascade

 drivers/gpu/drm/xe/xe_device.c               |   5 +
 drivers/gpu/drm/xe/xe_exec_queue.c           |  13 ++
 drivers/gpu/drm/xe/xe_exec_queue.h           |   1 +
 drivers/gpu/drm/xe/xe_exec_queue_types.h     |   2 +
 drivers/gpu/drm/xe/xe_gpu_scheduler.c        |  13 +-
 drivers/gpu/drm/xe/xe_gpu_scheduler_types.h  |   2 +-
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c          |   1 +
 drivers/gpu/drm/xe/xe_guc_exec_queue_types.h |  10 +-
 drivers/gpu/drm/xe/xe_guc_submit.c           | 180 +++++++++++++++++--
 drivers/gpu/drm/xe/xe_guc_submit.h           |   1 +
 10 files changed, 206 insertions(+), 22 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-11-19  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19  0:04 [PATCH v5 0/4] FD close cleanup for XE Daniel Charles
2026-11-19  0:04 ` [PATCH v5 1/4] drm/xe: Read scheduler message opcode under lock Daniel Charles
2026-11-19  0:04 ` [PATCH v5 2/4] drm/xe: Notify scheduling-state waiters per exec queue Daniel Charles
2026-11-19  0:04 ` [PATCH v5 3/4] drm/xe: Disable scheduling early on FD close to avoid CAT error cascade Daniel Charles
2026-11-19  0:04 ` [PATCH v5 4/4] drm/xe: Synchronously wait for queue kill on FD close Daniel Charles

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