All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] drm/xe: Fix VM teardown and migration queue recovery
@ 2026-10-28 12:21 Arvind Yadav
  2026-10-28 12:21 ` [PATCH v2 1/4] drm/xe: Hold a device reference across deferred VM destruction Arvind Yadav
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Arvind Yadav @ 2026-10-28 12:21 UTC (permalink / raw)
  To: intel-xe, dri-devel
  Cc: rodrigo.vivi, matthew.brost, himal.prasad.ghimiray,
	thomas.hellstrom, sanjay.kumar.yadav

On BMG, terminating a process with Ctrl+C while GPU work is running
under VRAM pressure can cause an RCS page fault followed by a migration
queue timeout on BCS8. Recovery can then end in repeated timeouts and
device wedging.

During file close, exec queues are killed asynchronously. VM teardown
can remove their mappings before queue cleanup has finished, while
the hardware may still access them.

This series starts scheduling disable earlier, marks VMs as closing
before queue cleanup, and keeps their mappings until the tracked
queues have been freed. It also holds a device reference across final
VM destruction.

File close uses one five-second queue-wait budget across all VMs.
If cleanup is still pending, VM teardown is deferred. VM destroy
defers without waiting for queues whose handles remain owned by
userspace. Existing teardown waits are unchanged.

With the reduced four-patch series, I have not reproduced the failure
in my current testing. The hardware link between the RCS fault and
the BCS8 stall remains under investigation.

Changes in v2:
- Reduce the series to four patches following review.
- Run deferred VM close and final VM destruction on the
  module-lifetime destroy workqueue.
- Use a shared queue-wait budget during file close and defer teardown
  when queues remain.

Arvind Yadav (3):
  drm/xe: Hold a device reference across deferred VM destruction
  drm/xe: Mark VMs as closing before queue cleanup
  drm/xe: Defer VM teardown until exec queue cleanup completes

Matthew Brost (1):
  drm/xe: Disable scheduling early on FD close to avoid CAT error
    cascade

 drivers/gpu/drm/xe/xe_device.c               |  25 ++-
 drivers/gpu/drm/xe/xe_exec_queue.c           |  22 ++-
 drivers/gpu/drm/xe/xe_guc_exec_queue_types.h |   2 +-
 drivers/gpu/drm/xe/xe_guc_submit.c           |  46 ++++-
 drivers/gpu/drm/xe/xe_pagefault.c            |   2 +-
 drivers/gpu/drm/xe/xe_svm.c                  |   3 +-
 drivers/gpu/drm/xe/xe_vm.c                   | 191 +++++++++++++++++--
 drivers/gpu/drm/xe/xe_vm.h                   |  14 +-
 drivers/gpu/drm/xe/xe_vm_types.h             |  16 ++
 9 files changed, 286 insertions(+), 35 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-10-28 22:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 12:21 [PATCH v2 0/4] drm/xe: Fix VM teardown and migration queue recovery Arvind Yadav
2026-10-28 12:21 ` [PATCH v2 1/4] drm/xe: Hold a device reference across deferred VM destruction Arvind Yadav
2026-10-28 13:59   ` Yadav, Sanjay Kumar
2026-10-28 12:21 ` [PATCH v2 2/4] drm/xe: Disable scheduling early on FD close to avoid CAT error cascade Arvind Yadav
2026-10-28 12:21 ` [PATCH v2 3/4] drm/xe: Mark VMs as closing before queue cleanup Arvind Yadav
2026-10-28 14:00   ` Yadav, Sanjay Kumar
2026-10-28 12:21 ` [PATCH v2 4/4] drm/xe: Defer VM teardown until exec queue cleanup completes Arvind Yadav
2026-10-28 14:01   ` Yadav, Sanjay Kumar
2026-10-28 12:30 ` ✓ CI.KUnit: success for drm/xe: Fix VM teardown and migration queue recovery (rev2) Patchwork
2026-10-28 13:07 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-28 22:09 ` ✗ Xe.CI.FULL: failure " 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.