GPU: a list gives its scratch chunks back when its submission lands, not after the bury lag #112
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!112
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-112"
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?
@simbaui4life on GitHub · 2026-11-27 18:19 UTC · original
fix/scratch-at-landing→main· +939 −7 · 7 files · 2 commits · closed without mergingBuilds on #111 (the memory bench): its commit is included, and only the last commit is new.
This is a port of work originally made for avatarmanz/VIctory-7900XTX (that repository is no longer reachable). The numbers below were measured on this fork.
Cause: a host list kept every scratch chunk it took until its reset, and a list that has run is reset only after the bury lag (
host.rsland()/bury_lag()). The lag is 16 submissions on a PC with 32 GB or less (residency::limited_host_ram()) and 64 above. In the relay mode thatscripts/play-foxhound.ps1sets (VICTORY_RELAY=2), the memory bench at only 8 lists a frame had 42 landed lists holding 130.5 MB of 4 MiB chunks. A game run makes far more host lists a frame, so the real amount is likely larger. That is not measured here.What this does
release_tables(), a list hands its chunks to the spare pool (HostList::release_scratch). This happens at both landing sites inhost.rs, throughDetached::release_scratch()inlist.rs.scratch_heldputs in slots go withrelease_tables()at the same moment.spare_what_fits). That limit isSPARE_MOST, 128 MiB, on a PC with 32 GB or less, andSPARE_KEPT, 1 GiB, above withVICTORY_KEEP_FREED. Chunks the pool does not take stay with the list and are freed at its reset after the bury lag, as before.VICTORY_SCRATCH_POOL, on by default).VICTORY_SCRATCH_AT_LANDING=0turns it off.memory_bench_steady_statenow asserts that landed lists keep no scratch.Tested (RTX 4070 Ti, driver 621.01, Windows 11 26200, debug build, 32 GB RAM; the same build with the switch off and on)
VICTORY_RELAY=2 VICTORY_RELAY_COPY=1play-foxhound.ps1sets by default,VICTORY_THIN=1among them):cargo test -p victory-gpu: 418 passed, 2 failed, 37 ignored, the same as the bench PR. The 2 failures are already on main (indirect::tests::host_list_budget_starts_empty_at_each_submission,indirect::tests::warp_batch_charges_every_execution).descriptor::tests::records_copied_as_bytes_are_made_at_the_next_syncfailed once in a full run while another test job used the GPU. It passed alone 5 of 5 times and in 4 more full runs. It calls the globalsync_heaps(), which tests running beside it also call, so it looks like a race between tests rather than this change.-D warningsadds nothing (main's existing failures are listed in the bench PR). rustfmt: no new differences in the touched files.Not tested:
No game data in the commits.
🤖 Generated with Claude Code
@JoeY54 on GitHub · 2026-11-27 21:41 UTC · original
Independent synthetic validation of this exact PR head
4ad8b9b4dd133bf1b2cfe5cb9ef25754f8fff38eon a PC above the 32 GB RAM threshold.Environment: RTX 5090 32 GB, driver 621.24; Ryzen 9 9950X3D; 192 GB installed RAM; Windows 11 build 26300; Rust 1.98.1/MSVC. Debug test profile. An independent D3D12 adapter probe confirmed the default device is the RTX 5090 (10de:2b85, software=false). Exclusive GPU use, serial tests, separate process and cache/data directories per case; inherited VICTORY_* variables cleared. No game data or game launch.
Method: same unchanged PR-head build for both switch states. Three relay runs with
VICTORY_SCRATCH_AT_LANDING=0, followed by three with=1;VICTORY_RELAY=2 VICTORY_RELAY_COPY=1. Each steady-state run uses the benchmark's 60 warm-up + 240 measured frames.All six relay steady-state runs passed. End-of-measurement values below are MiB (the benchmark labels them MB but divides by 2^20).
The median private-byte reduction is 649.2 MiB, about 52.7%, in this synthetic scenario. Both switch states remain flat during the measured interval.
Additional controls:
Scope: ten successful benchmark invocations at the exact head (six relay steady, two no-relay steady, two pressure). No source modifications. The complete workspace suite was not run at this standalone PR head. The benchmark does not exercise draws/dispatches, descriptor/texture paths, thin mode or real presentation, and these short runs do not prove long-term leak freedom or game performance. The on/off runs were sequential, not randomized. This adds the previously untested >32 GB RAM case, without claiming coverage beyond the synthetic workload.
AI-assisted by OpenAI Codex.
Pull request closed