Slot eviction: hang probe and stack dump, compute protection, opt-in guards, memory by holder #2372
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2372"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by Ahadfahim on 2026-11-29T12:28:50Z.
What this adds
Tools and guards built while chasing the
Unsignaled CrossQueueBarriercrash withVICTORY_SAMPLED_MARKS=1+VICTORY_SAMPLED_EVICT=1(RTX 5080, 16 GB). The crash turned out to be the same slot-lock / texture-table inversion thatcf338eabalready fixes, so this keeps that fix as it is and adds what helped find it.Hang probe (
queue/behind.rs;VICTORY_HANG_PROBE=0turns it off): after 3 s without a presented frame it logs each queue's front (fence/value wait and whether met, submission, signal, present), every fence wait and signal in the line, and the submission counts. It repeats every 5 s (at most 6 times) and logs when frames come back.Hang dump (new
hangdump.rs;VICTORY_HANG_DUMP=0turns it off): on the probe's 1st and 3rd look it writes every thread's named stack to%LOCALAPPDATA%\victory\logs\hang-<unix>-<pid>.txt. Each thread is suspended in turn, unwound with no allocation, then resumed. This is what showed the ABBA (submit thread: table → slot lock; list thread: slot lock → table).Compute protection: compute programs mark the slots they read in the upper half of the marks buffer (
SAMPLED_COMPUTE), and those textures are never evictable.VICTORY_SAMPLED_PROTECT=nonpixelextends this to every non-pixel stage. The setting is keyed in the shader cache.Slot eviction guards, all off by default:
VICTORY_SLOT_EVICT_IDLE_MS: 60000 cut "made again" from about 50% to 2–20% here.VICTORY_SLOT_EVICT_MAXVICTORY_SLOT_EVICT_MIN_FPSF8 and F7 flushes bypass them.
Every 10 s: a "slot eviction since the start" line and a "card memory by holder (MiB)" line. The holder line covers texture blocks with their free and widest-free space, buffer copies split into copies / windows / arenas / mapped, staging blocks, targets and the rest. It's how a texture pool with 2 GB free but only 29 MiB widest free was spotted.
play-foxhound.ps1: optional-Victory <exe>and-SettingsFile <file>to run a saved build with its own settings. Both are carried through F1 restarts.Testing
cargo test -p victory-gpu --lib: 916 passed.cargo test -p victory-shader --lib: 462 passed.568c5e5base: 13 minutes with eviction active and no freeze after the lock fix, and compute protection running through 11+ minutes of eviction.739f8339/cf338eabwas done by hand.🤖 Generated with Claude Code
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.