cores: place VIctory's threads off the title's CCD on two-CCD Ryzens (VICTORY_CCD, off by default) #398
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!398
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/398/head"
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?
@motioncsgo on GitHub · 2026-11-26 23:30 UTC · original
motioncsgo:ccd-placement→main· +252 −12 · 2 files · 1 commits · closed without mergingOff by default. Adds placement for CPUs with two or more equal last-level caches (Ryzen 5900X/5950X, 7900X/7950X, 9900X/9950X, Zen 2 3000 series). Today
cores.rsplaces our threads only on hybrid CPUs and X3D parts. On a symmetric two-CCD Ryzen, every VIctory thread floats over both CCDs, while the title pins its own threads to logical CPUs 0–15 (it importsSetThreadGroupAffinity, bound to the host). On a 5950X that is all of CCD0.What changes
cores.rsreads which last-level cache each CPU set belongs to (l3_domain_of_sets, the lowest logical processor under that cache). Where there are two or more caches of one size and neither class nor cache size already picks "fast" cores,VICTORY_CCDdecides (ccd_split):far(or1): our placed threads (submit, relay, land, aside, heap sync, views and thevictory-listtranslators) prefer the caches without CPU 0, so the title has its CCD to itself.near: the critical threads (stages 1–2) stay beside the title; only the list translators (stage 3) move away.0: as before.VICTORY_CCDcan be on (they don't by default withVICTORY_FAST_CORES=2).VICTORY_LANE_CORE=1now takes effect on these CPUs too: the submit thread is registered, and on a 5950X it gets CPUs 30–31.VICTORY_AB=<s>,VICTORY_CCDswitches it live (queue.rssettles again on a phase change, as forVICTORY_CACHE_CORES/VICTORY_LANE_CORE).VICTORY_CCD_MODE=nearpicks near for the on phases.fast_by_class,fast_by_cache) behave exactly as before;ccd_splitreturnsNonethere.Nonefor one complex (9800X3D), X3D, hybrid and unknown domains; mode parsing; this machine's domains.Measurements
Ryzen 9 5950X, RX 7900 XTX (32.0.32015.12012), 64 GB DDR4, Windows 11 26200. Diag build of Belobug
a-publiercd8dfc06(= this repo'sc9c932c+ 3) with this patch.play.ps1defaults + renderer ports 1, 2, 5, 6 and 7 +VICTORY_FETCH_CHECK=1, Series X 2560×1440 → 3840×2160, RT off. New story from the same save state, prologue cell, no input. Pipelines warmed for the ports variant.Same-scene A/B,
VICTORY_AB=20,VICTORY_CCD,VICTORY_LANE_CORE, 23 phases of 20 s in the world (~400 frames each), each compared with its neighbouring baseline phases:VICTORY_CCD=farVICTORY_LANE_CORE=1VICTORY_TIMELINEcapture puts ~25 ms of the ~47 ms critical chain on the title's own thread ("outside our spans"). That thread shared its CCD0 cores with our helpers (8victory-listthreads at ~34 ms CPU each per frame).Not verified
nearis implemented but not measured.cores::unit tests pass with and withoutdiagnostics.cargo clippy -p victory-gpu --all-targets --all-features -- -D warningsreports nothing incores.rsorqueue.rs; its existing failures elsewhere onmain(panel.rs, place.rs, rtstamps.rs, list.rs, texture.rs, watch.rs; see #280) are unchanged. The game A/B was run on the Belobug base named above, not on this exact head.To try it:
VICTORY_CCD=far(+VICTORY_LANE_CORE=1), orVICTORY_AB=20,VICTORY_CCD,VICTORY_LANE_COREin a diagnostics build and compare theA/B phaselines.🤖 Generated with Claude Code
@motioncsgo on GitHub · 2026-11-26 23:34 UTC · original
Closing in favour of #399, which has the same change as an inline patch (
git am), so I don't have to keep a fork around. Thanks!Pull request closed