Repository navigation
Conversation
7ddb50c to
d140d08
Compare
d140d08 to
e85fd3f
Compare
|
No blockers.
What I checked: field order drops HW row: one non-M5 G17 Mac (Neo or J616s) running this head: two clients alternating on the render pairs for a few minutes (e.g. vkcube plus a GL client), 0 client faults and 0 GPU recoveries. Also add the regression counts from the M5 Ultra run (0 AVC denials, 0 failed units, 0 new kernel errors). Assisted-by: LLM (Claude:Opus 5.5) |
A render pair's two kick rings are mapped read-only into the VM of the client that runs on the pair. That view was handed to the VM and kept until the VM was closed, so after the pair moved to a queue of another client the previous VM still mapped the rings. A pair rebound in place to a context of another VM was also not cleared first. The views of the kick rings now belong to the pair's time in a VM instead of to the VM. The pair holds them while it runs that VM's contexts and moves between them, and keeps them while it is parked for as long as the VM is open, so a later context of that VM reuses them. Once the client has closed the VM, a parked pair gives them up: when it parks, when it comes back from a failed rebuild, and, for pairs already parked, when the VM is closed. A parked pair therefore never keeps a closed VM's page tables alive. The views are dropped off the device lock. When the pair goes to a context of another VM, the rings are cleared and the new owner's first entry is written only after the previous VM's views are gone. From the parked state, the previous VM's views are removed and the rings cleared before the new VM's views exist. On an in-place rebind, the rings are cleared first, the new VM's views are then created while the previous VM's still exist, and the previous VM's views are removed when the new binding is installed; both are read-only and the cleared rings hold no entries, so neither VM can read the other's. Either way the pair is idle and the firmware consumed every entry; a rebind that fails keeps the previous VM's views. A pair drops its views before its rings, so a ring that is reused never finds an older view of its pages. Reported-by: Erik Bourget <erik@ebourget.net> Suggested-by: Erik Bourget <erik@ebourget.net> Suggested-by: Ryan Murray <ryan@aurorasilicon.org> Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
e85fd3f to
ad9ab51
Compare
|
Thanks, Ryan. Both points are addressed in the commit, now at ad9ab51:
I've added your J775D on this head (stacked with #1973 and our other three open drm/asahi PRs on integration/aurora cc14570, 27.0 firmware, default command line; the kernel also carries a local fix for an appledrm boot oops, see #1973):
Rows we can't run: could your lab, or a Neo or J616s owner, run this head? The change covers every G17 part's render pairs. The useful row is two clients alternating on render pairs for a few minutes with correct renders, the render CTS subset, KUnit pass counts per suite, 0 failed units and 0 new kernel errors. |
|
Re-review of ad9ab51: No blockers.
HW row: the new run is on the M5 Ultra only, on an integration stack with other open PRs and a local appledrm fix. Still needed: one non-M5 G17 Mac (Neo or J616s) on this head, two clients alternating on the render pairs for a few minutes with correct renders, a client closing while its pair is parked, the render CTS subset unchanged, 0 client faults, 0 GPU recoveries, 0 failed units, 0 new kernel errors. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review (§1–§6) on live head ad9ab51fac730065c43bb6b149d7aba0c2f3757d (host-tests: pass).
Checklist Summary
- §1 No model gating: Pass — applies uniformly to all G17 render pairs with zero chip/SoC/board/firmware gates.
- §2 Production-ready, no hacks: Pass — default kernel command line, no new parameters, no sleeps/retries/lab-only paths.
- §3 Safety: Pass — no hardcoded hardware safety constants.
- §4 Clean-room & attribution: Pass — commit
ad9ab51fac73carries human author/committer and humanReported-by/Suggested-by/Signed-off-bytrailers only; PR body includesAssisted-by:. - §6 Naming: Pass.
- §5 Evidence: Holding for non-M5-Ultra G17 hardware proof.
Code Audit (0 blockers)
- Drop ordering verified in
Pair(kick_aliasesandclient_kicksprecedekicks),ParkedPair(client_kicksprecedeskicks), andRetiredBinding(client_kicksprecedesmemoryandcontext). Queue::render()(g17/kick.rs) now requiresOk(Some(alias))to reuse retired ring storage, preventing reuse if a client unexpectedly retains an existing mapping.- Closed-VM view release is complete and race-free:
file::Vm::drop()callsstatus.release_mirror()(markingclient_closed) beforeself.gpu.vm_closed(&self.vm). Already-parked pairs release views one at a time inGpu::vm_closed()outsidestate.lock(); pairs parking afterwards hand views toRetiredBindinginPair::park(); pairs returning from a failed rebuild take closed views understate.lock()ininstall_parked_pair()and drop them after releasing the lock. - Cross-VM rebind (
Pair::prepare_bind/Pair::bind_owner): rings are cleared before preparing the new VM's read-only views, unexpected pre-existing aliases fail withEFAULT, failed rebinds retain the prior VM's views, andbind_ownerdrops the previous VM'sclient_kicksbefore any new kick entry can be written (safe understate.lock()sinceold_contextremains pinned inself.displacedandinstall_memory/drop(moved)already establish thestate -> gpuvmlock order). Commit message and PR body accurately distinguish the parked vs in-place rebind ordering.
Holding For (§5)
0 code/policy/attribution/naming/CI blockers. Holding approval solely for the missing cross-chip G17 hardware row on this head (the J775D run was also stacked with #1973 and other open PRs):
- One non-M5-Ultra G17 Mac (Neo G17P or J616s) on this head: alternating clients on render pairs with verified render output, a client closing while its pair is parked, render CTS subset matching baseline, KUnit pass counts, 0 failed units, and 0 new kernel errors.
Assisted-by: LLM (Gemini 4 Neon)
Problem
A render pair's two kick rings are mapped read-only into the VM of the client that runs on the pair. That view was handed to the VM and kept until the VM was closed, so after the pair moved to a queue of another client the previous VM still mapped the rings. A pair rebound in place to a context of another VM was also not cleared first.
Change
The read-only kick-ring views now belong to the pair's time in a VM, not to the VM.
This applies to the render pairs of every G17 part, with no chip, board or firmware condition. It does not depend on #2501.
Since RyanTheTide's review: a parked pair now drops a closed VM's views (when it parks, after a failed rebuild, and through a new close hook for pairs already parked), and this description and the commit message say when the previous views are removed on each path.
Testing
On the J775D (Mac Studio, M5 Ultra), 27.0 firmware, integration/aurora cc14570 with #1973 and our other three open drm/asahi PRs, default command line, one boot (the kernel also carries a local fix for an appledrm oops at boot on current integration, not part of this PR). Two clients alternated on the render pairs for 165 s with the desktop stopped, while a third client held its pair: 4998 rounds each, every render completing (fence signalled; these clients do not read back), 0 client failures, recoveries or faults. The render CTS subset gives 571 Pass and 57 NotSupported, as on the same base without the series. KUnit (366 of 368 pass, two skips as on the base) and the upstream host tests (427 of 427 on base and head, no result differs) pass.
Regression run (ALARM has no SELinux, so there is no AVC count): 0 new failed units (iwd.service and systemd-networkd-persistent-storage.service fail on the read-only test root with and without the series) and 0 new kernel error lines against the boot without the series.
Still to run
Full test results
On the Mac Studio (M5 Ultra), read-only test root:
Thanks to ewb for the report and the suggestion, and to RyanTheTide for the review.
Assisted-by: LLM (Claude:Opus 5.5)