Files
mac_linuxgpu/scripts
geramyloveless af101f49cb kfd session: recover a queue MES does not confirm removing
A client killed with an open engine left its session uncertain whenever
DESTROY_QUEUE failed: remove_queue_mes times out when a wave neither
finishes nor preempts, KFD asks for a GPU reset that recovery-off turns
into a log line, and the session kept every buffer. The dext then
quarantined the device until a replug.

Tear a dying client down as upstream recovers a hung MES user queue
(amdgpu_userq's detect_and_reset before the unmap): when DESTROY_QUEUE
fails after KFD already took the queue off its lists, MES resets the
compute queues it finds hung and removes this one again with
remove_queue_after_reset, under the device queue manager's lock as
remove_queue_mes runs. A queue KFD still lists is retried with
DESTROY_QUEUE instead, never a second DESTROY_QUEUE on a detached one.
Close tries every queue, and keeps memory only while something is still
unconfirmed.

An SDMA copy that outlives its timeout keeps its fence: the session
settles once it signals, and close waits for it once more, bounded.
rt_kfd_session_settle retries all of this without closing, and
rt_kfd_session_failure names the first step that could not confirm the
GPU let go. Each failure and recovery is logged with the queue and
doorbell.

The KFD fixture gains a MES whose queues can hang (REMOVE_QUEUE fails
until a hung-queue reset), die or answer slowly, kfd_hws_hang's reset
request as recovery-off logs it, and an SDMA engine that holds copies.
The tests kill clients mid-session with a hung queue, a slow MES, a MES
that never answers (kept, then recovered by closing again), a destroy
retried by a settle, a copy that outlives its timeout, a bounded launch
whose wave never preempts, and a client closed with a hung persistent
queue; every buffer and allocation is accounted for afterwards.
2026-10-03 10:15:54 -07:00
..