List threads no longer queue behind exact and loose copies being made; same page mappings are not redone #443
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/Belobug--VIctory-Belobug-AMD!443
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-443"
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?
@wesneyalcantara-lang on GitHub · 2026-11-27 02:03 UTC · original
wesneyalcantara-lang:locks-and-same-mappings→a-publier· +119 −25 · 2 files · 2 commits · openTwo lock fixes for the list threads, and one fewer pair of mapping calls for the title's main thread. Measured on a 12 GB NVIDIA card with
scripts\play.ps1settings plusVICTORY_OUTPUT=1280x720.What profiles showed (
VICTORY_PROFILE, list threads)shadow::EXACT's mutexshadow::LOOSE's lock (withVICTORY_WINDOW_KB=256)exact(): every miss swept the whole map (two COM calls per copy, ~2,700 kept) and made its host buffer while holding the mutex. Now the sweep comes once the map has doubled since the last one, the buffer is made outside the lock (asked again after; a thread that made the same copy meanwhile wins), and hits take a shared lock.loose(): with a finer window grid or tails, the window was chosen only under the write lock, so nearly every asking took it; and a missing window's buffers (shared_buffer,window_card_for,window_mapped_for) were made while holding it. The choice is now made under the shared lock too, and a new window is made outside the lock and put in after, the same way.xmem::change(): a page asked to show the page it shows already is passed over (no unmap/map, its guards kept).VICTORY_MAP_SAME=0restores the old behaviour; the count is in the mapping line. Not measured in the game yet: covered by a new unit test only.Frame rate
With the lock fixes, median FPS in scenes with more than 1,500 draws went from 4.0 to 4.9 (same scene, ~3,400-3,600 draws). Single runs on one machine, not an A/B with several runs each.
12 GB cards
The card-buffer tier for 12 GB cards is a separate pull request, #444 (it gave the larger gain of the two).
Checks
cargo clippy -p victory-gpu -p victory-hle --all-targets [--all-features] --locked -- -D warningsandcargo test -p victory-gpu -p victory-hle --lib --lockedpass.🤖 Generated with Claude Code
@gw1337x on GitHub · 2026-11-27 03:29 UTC · original
Ran in the title on RDNA 3: RX 7800 XT 16 GB (driver 32.0.32015.7029), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 26200 (Memory Integrity off). Diagnostics builds of
4eb6cfdwith and without this PR (d52ad9f), both with a few extra timeline spans of mine around the mapping lock, same boot.Settings:
scripts/play.ps1settings plusVICTORY_PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1, Series X profile, ray tracing off, andVICTORY_MAP_THREADS=8, so thatchange()and the new skip are on the path (the launcher's=1goes throughmap_aliasone page at a time). fps is the layer's 1 s figure from the window title, every second.Drive: from a Chapter I boat save, throttle held from 190 s with a short right turn, 195-230 s (the boat crosses open water and reaches the mangroves under the bridge). Interleaved PR, base, PR, base:
4eb6cfd4eb6cfdHands-off from the same save (270 s), seconds under 15 fps during the cutscenes and scene loads (60-190 s): 13 and 14 with the PR, 15 and 15 without it (earlier in the same hour); steady 28-29 fps for both.
No measurable change in this scene, no problems (no device loss, peak commit 33.4-34.0 GB for both). One caveat: I could not confirm the skip fired, because the "passed over so far" count is only logged when
VICTORY_MAP_THREADSis unset (asked_threads().is_none()), and these runs set it to 8.@MamaLeVrai on GitHub · 2026-11-27 03:55 UTC · original
Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At
d52ad9f:cargo test --release -p victory-gpu --lib396 passed, 0 failed, 34 ignored;victory-hle162 passed, 0 failed, 2 ignored.AI-assisted (Claude Code); no game data.
@Robotniq on GitHub · 2026-11-27 09:01 UTC · original
Tested in the title on an 8 GB NVIDIA card: RTX 3070 Ti (8 GB, driver 32.0.16.2140), i7-13700F, 32 GB RAM, Windows 11 26200. Diagnostics build of
4eb6cfdwith and without this PR,--console series-s, thescripts\play.ps1settings (not-Safe),VICTORY_PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1,VICTORY_D3D12_DRED=faults, ray tracing off. Same save, about six minutes in the prologue's first area per run, warm pipeline library.Frame rate by draws a frame (median of the frame lines in each band):
4eb6cfdList calls (
VICTORY_THIN, median over the frame lines at 20,000 calls or more): 37.2 µs a call before, 14.3 µs with this PR (about 1,700 ms a frame over the eight threads down to about 340 ms at 36,000-38,000 calls).VICTORY_PROFILEover 90 s, the eightvictory-listthreads:4eb6cfdMutex::lock_contended<-shadow::exactRwLock::read_contended<-shadow::exactRwLock::write_contended<-shadow::exactMakeResident<-shared_buffer<-shadow::exactCondvar::waitinthin::start)The frame line there reads about 230 copies of views' own bytes made a frame with 3,600 kept (1,500 asked for), so on this card what is left in
exactis the making of the buffers itself (#451's ground). With the PR the card is the limit here (about 80% busy by the card's clock line, 40% before).No device loss and nothing in
crashes.login either run with the PR. I did not testVICTORY_WINDOW_KB=256, so nothing here speaks for theloosehalf.AI-assisted (Claude Code): the runs, the profile reading and this text.
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.