From: Daniel Charles <daniel.charles@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: x.wang@intel.com, jia.yao@intel.com, matthew.brost@intel.com,
jonathan.cavitt@intel.com,
Daniel Charles <daniel.charles@intel.com>
Subject: [PATCH v5 0/4] FD close cleanup for XE
Date: Wed, 18 Nov 2026 16:04:42 -0800 [thread overview]
Message-ID: <20261119000446.696147-1-daniel.charles@intel.com> (raw)
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
next reply other threads:[~2026-11-19 0:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 0:04 Daniel Charles [this message]
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
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=20261119000446.696147-1-daniel.charles@intel.com \
--to=daniel.charles@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jia.yao@intel.com \
--cc=jonathan.cavitt@intel.com \
--cc=matthew.brost@intel.com \
--cc=x.wang@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