gpu: a heap buffer view one pool run holds follows the title's pages too (stale entries, #79) #513
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/513"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T23:18:02Z.
Refs #79, #258. Follow-up to #267 and #319.
Bug. A heap entry for a buffer view that one pool run holds points at the pool pages the title had there when the entry was written.
remirror_tablesskipped the entry, because its record bytes hadn't changed, andmirrorhad dropped it fromtitle_views.Fix. Such a view stays in
title_viewswith the signature of the mappings under it, andfollow_title_pagesmirrors it again when they change. That's the same path as the wrapped views of #267.Measured in 300 s world runs, Series S, on preview + #459:
Moved views: 2,048 such views moved in one run.
Stale bound entries: a check at each draw and dispatch found a bound entry pointing away from its view's memory more than 1,000 times without the fix, and 3 and 0 times with it.
Garbage indirect records past the gates' limits:
The [3, 864026624, …] draw records weren't seen in the three runs with the fix (they appeared in 4 of 8 before), but that cause isn't proven.
Cost: 572,863 views followed after 300 s, an average of 4.7 ms per look over 1,000 looks, so 1.6% of the run. Frames in 300 s: 2,331 and 2,441 with the fix, against 2,304–2,368 without. This is marked
shortcut:, with the upgrade: walk only the views over ranges the pool table changed.Test.
a_view_one_pool_run_holds_follows_title_pages_remapped_under_itreads through the moved view, then stores through it. Before the fix the store went to the old pool page, and the test fails without the change.copies_of_a_wrapped_view_are_followed_with_one_walknow expects 2 walks rather than 1, on purpose: the output view is followed too, and it's still one walk per range.Checks: victory-hle, victory, victory-gpu (413) and xtask tests pass (arm64). Windows clippy is clean with
-D warnings,cargo xtask policypasses, anddocs/native-host.mdis updated.Not covered:
238b1c799e1ee23csometimes take the float path (0x33800000 is the half float of 1).@LakshanSivakumar, this is ours, so it needs your approval.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T00:37:14Z.
A correction to this PR's description and docs: the "no record past the limits in three runs with the fix" result held for headless runs only. A windowed run of the same build still had 15 records past the limits, so following the pool-held views does not stop the garbage indirect records. Their source is still open. The stale-entry fix itself and its test stand. #525 corrects the sentence in
docs/native-host.md.