GPU: trim caches under system commit pressure #43
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/43"
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 DexNom/VIctory. Originally posted by tecnofifamobile-ai on 2026-11-25T20:24:53Z.
Summary
The crash log recorded
0x8007000Etexture/pipeline failures followed by a Rust allocation failure, while Windows Event 2004 showed system commit at 49,847,648,256 / 50,114,695,168 bytes andvictory.exeat 22,322,229,248 bytes. This change makes idle GPU caches respond to system commit pressure, not only VRAM and physical RAM pressure.Validation
cargo test -p victory-gpu -- --test-threads=1(190 passed, 3 ignored; doc tests passed)git diff --checkImported from DexNom/VIctory. Originally posted by Artking175 on 2026-11-25T21:10:12Z.
Two details worth checking against the out-of-memory run:
IDLE_FRAMES = 4inlong_ago. At 0.2–0.4 frame advances per second, that gate is roughly 10–20 seconds even with the 250 ms commit-pressure timeout. I saw that frame-rate range on RTX 2060 during a separate dark-prologue run. The new threshold tests exercise the millisecond policy only. A case covering slow frame advancement would make the practical eviction delay visible.MEMORYSTATUSEX.ullAvailPageFilereports commit available to the calling process, which can be lower than the system-wide headroom in Event 2004. The effective process value seems useful for this heuristic. Could the helper documentation name that distinction? Microsoft's field documentation.This is a source review of
1a82816.Imported from DexNom/VIctory. Originally posted by j-fuxa on 2026-11-26T01:41:12Z.
Measurements on what counts toward process commit and working set (NVIDIA)
These bear on the commit-headroom signal in this PR. They come from an RTX 4060 Laptop 8 GB, 32 GB RAM, Windows 11, at the title's world entry, in a different fork where we used a job-object commit limit as a guard.
texture_idle_msthat local-memory textures also consume the commit limit. It also means headroom can fall while physical RAM and the host caches are not the cause, so shorter cache idle times may not give it back.QueryWorkingSet's share count saturates at 7, so it cannot dedupe. Walking the working set over the known views and counting each section page once does work.Why it may matter here. If trimming is meant to react to commit, it helps to log three things separately when headroom is low: commit charged for VRAM textures, the host caches, and the title's sections. Then a low-headroom event can be attributed.
Caveats. NVIDIA only. We do not know whether the Radeon driver charges VRAM textures the same way. One title, one scene, numbers from our own builds and not from this branch.
Imported from DexNom/VIctory. Originally posted by Artking175 on 2026-11-26T05:32:25Z.
I checked the follow-up at
8354242on Windows 10. The six pressure-filtered tests and the separate requested-sweep test passed, includingcommit_pressure_does_not_wait_for_slow_frame_advances. The updated documentation also distinguishes per-process commit headroom from the system-wide value in Event 2004. This addresses both points from my earlier review. The tests cover the sweep policy and age gates. I did not drive the machine into an actual out-of-memory condition.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.