Repository navigation
drm/asahi: g16: keep a VM's last PB epoch until its next render retires - #3101
Conversation
Compute commands queued behind compute flights of any VM, so the CDM pipes ran dispatches of different VMs at once, without a barrier between them. With six dEQP-VK processes, about one draw in 285 of dEQP-VK.glsl.texture_functions.* then read back zero or a partial image, with no fault and no recovery: the readback copy, running beside another VM's compute, lost its results. One process never fails, every failed case passes alone, and the failures stop entirely once compute waits for other VMs' flights, over three full runs. gpubench compute.long showed the same loss: a ray-query dispatch that another VM's compute overlapped was reported complete with its results unwritten. Let compute publish behind its own VM's flights only, on either pipe, as it already did behind another VM's render, and as G15 runs one VM at a time. Compute of one VM still pipelines on both pipes, and renders still pipeline across VMs. Signed-off-by: Diljit Singh <hey@djdev.me>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
With the display manager running, gpubench-vk render.light kind=tri
--mode procs at depth 16 faults in 5 to 11 of 13 runs on J773g, and the
GPU can be lost for the rest of the boot. With the display manager
stopped, the same kernels pass. Every fault has one shape:
fault bank 3: status 0x8f81fdc021 va 0x704000cf00
(write unmapped level 0 unit 0xe0 ctx 62)
attribution: busy=0 ctx=62 flight_matches=1 live_vm=Some(108)
event=0xffffffff flights=1
Unit 0xe0 is gPM_SP(0), the parameter manager. The DYNAMIC window holds
only PB page lists: the faulting addresses are records 16 to 976 of a
VM's first (0x7040000000) or second (0x704000c000) page list. The
context is an open client's, and the only flight is that client's cold
InitBM render.
kwin and the login greeter's VMs move the round-robin [home, alt] PB
slot pairs, so 16 clients and those VMs share 16 warm slots and take
displaced slots from each other while all are open. When another VM's
epoch retires on slot k, retire_flight() replaces owners[k] and the
open VM's epoch goes, unmapping its page list. At that VM's next InitBM,
the parameter manager writes back to the page list of the manager the
context used last, through that context, and the list is gone.
Commit 047b934 ("drm/asahi: g16: keep closed VMs' PB epochs until
their slot is replaced") covered only closed VMs.
Keep each VM's last retired epoch in Pools, indexed by its TTBAT slot,
which the entry keeps bound. A newer render of the same VM replaces it
once that render fully retired; a failed render keeps it. A closed VM's
entry goes once none of its accepted renders is unpublished or in
flight, so closed VMs pin nothing extra. An open VM whose slot was taken
keeps one more epoch (two 32 KiB lists and its records) until its next
render retires. Count such replacements as "kept" on the debugfs pb
line.
Add host tests for the open-VM sequence and the closed-VM release, and
for the extra reclaim pass a closed VM's entry asks for.
Fixes: e30cdb9 ("drm/asahi: g16: scale warm render PB/UMA slots to 16 and keep pass slots VM-affine")
Signed-off-by: Diljit Singh <hey@djdev.me>
30bb38a to
990b848
Compare
|
Verdict at f445466: FINISH, then merge Both code blockers are resolved. All 26 The two-way Risk classification is present. Correct the full SHA in Tested and Not yet to the one above, and record the J773g result at that head before merge. |
…fix credits Address two review findings on the per-VM last PB epoch retention: - When a closed VM's final unpublished render reservation is cancelled, wake idle closed-VM reclaim so its displaced vm_last epoch and ASID do not stay pinned while idle. - When recovery retains an aborted job for quarantine and discards its unpublished suffix, return the discarded suffix's render credits while keeping the published quarantine backing intact. Add host regression tests covering both paths. Signed-off-by: Diljit Singh <hey@djdev.me>
|
J773g combined G16 train PASS on Apple M4 (T8132, G16G B0). Candidate
All 14 exact PR heads verified as merge ancestors
|
Summary
Fixes a G16 multi-client Parameter Manager (
gPM_SP(0), unit0xe0)"write unmapped"GPU fault triggered under KWin + multi-process depth-16 render pressure when warm PB slot reuse (e30cdb92b4f5, #3043) displaces a live VM's warm PB slot and unmaps its PB page list before the VM's next coldInitBMruns.Pools::vm_lastuntil its next render retires, reclaiming closed-VM entries once drained and exposing thekeptcounter in debugfspb.f445466d8f881c8cdcf3c9331afb408c0ecd28f4): canceling a closed VM's final unpublished render wakes idle reclaim so its displacedvm_lastepoch and ASID are released promptly, and a passed abort returns the discarded suffix's render credits while retaining published backing in quarantine.Risk
drivers/gpu/drm/asahi/g16/; revertible; does not change UAPI or non-G16 drivers).T8132,G16G B0).Tested
f445466d8f881c8cdcf3c9331afb408c0ecd28f4:T8132,G16G B0) combined 14-PR train row (#2741..#3087,#3046,#3101, candidateb4a8df87339a): 13/13 depth-16render.light procswith KWin active (pb kept2 -> 254), 10,639/10,639 Vulkan CTS recorded (7,358Pass,3,281NotSupported,0fail), 202/202 full GPUBench, 1/1compute.long, 3/3queue.exhaust, 1/1s2idle+ 2/2 post-wake smoke, 0 GPU faults / 0 recoveries / 0 hang kills (drm/asahi: g16: keep a VM's last PB epoch until its next render retires #3101 (comment)).Not yet
#3042and#3043also have exact-head NeoJ700G17P B1second-gen PASS rows).