Our threads prefer the big-cache cores on dual-CCD X3D Ryzens (VICTORY_CACHE_CORES) #147
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!147
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-147"
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?
@Jrjy3 on GitHub · 2026-11-26 07:30 UTC · original
Jrjy3:fps/cache-cores→main· +170 −5 · 2 files · 1 commits · merged 2026-11-26 08:17 UTCOn a Ryzen with two core complexes of which only one has the stacked cache (7900X3D, 7950X3D, 9900X3D, 9950X3D), every core reports the same efficiency class. So
cores::fast_offinds no fast cores, and none of our threads (submit, relay, late wait, landing helpers) asks for any: they run on either complex, and Windows moves them between the two. AMD's V-Cache service only steers games it recognises, andvictory.exeisn't one.What it does
VICTORY_FAST_CORESstages then apply as they do on Intel hybrids. It is still a soft preference (SetThreadSelectedCpuSets), and the title's own threads are not asked for.GetLogicalProcessorInformationEx(RelationCache), mapped to CPU set ids.VICTORY_CACHE_CORES=0turns it off. In diagnostics builds,VICTORY_AB=…,VICTORY_CACHE_CORESswitches it while the title runs (frame_endssettles again on each change, as forVICTORY_LANE_CORE).fast_sets(.., false)), so a later switch reaches threads that started during an off phase.Where it does nothing
Measured
Ryzen 9 9950X3D (96 MB L3 on processors 0-15, 32 MB on 16-31) + Radeon AI PRO R9700, Windows 11 26300. Diagnostics build of this branch,
scripts\play.ps1settings plusVICTORY_AB=20,VICTORY_CACHE_CORES, 10 minutes into the first boat mission. Pairs are phases next to each other whose draws are within 15 %:In the steady part (phases 18-29, about 3,900-4,000 draws), every phase with it on had a lower p90 (69.0-78.7 ms) than every phase without it (80.9-86.2 ms), at the same medians (66-70 ms). So it does not raise the average frame rate, but it makes the long frames shorter.
For comparison, pinning the whole process to the cache complex (an affinity mask, title threads included) cut our preparing from 22.6 to 19.4 ms, but the frame got slower (67.5 to 71.8 ms, separate runs). That is why only our threads are asked for, and softly.
One machine only. A run on another dual-CCD X3D part would be the most useful check:
VICTORY_AB=20,VICTORY_CACHE_CORESin a diagnostics build, standing still somewhere, then compare theA/B phaselines.Checks
cargo test -p victory-gpu --lib cores, with and withoutdiagnostics: 3 passed (2 new tests with synthetic topologies for the table above).cargo clippy -p victory-gpu --lib --tests -- -D warnings: no finding in the changed code. The ones it reports are already onmain(for examplequeue.rs:1277,texture.rs:2067, andvictory-formatstexture.rs:1346, which stops the workspace run).cargo xtask policy: 251 files ok.This change was made with AI assistance (Claude Code).
🤖 Generated with Claude Code
@avatarmanz on GitHub · 2026-11-26 07:56 UTC · original
Merged into main in the next push (tests pass); thanks.