Skip to content

cores: place dual-CCD V-Cache CPUs on CCD0 and isolate victory-submit on a dedicated core - #1093

Merged
trustno1-coder merged 1 commit into
trustno1-coder:mainfrom
Bazovsky:pr/submit-vcache-core
Nov 28, 2026
Merged

trustno1-coder merged 1 commit into
trustno1-coder:mainfrom
Bazovsky:pr/submit-vcache-core

Conversation

@Bazovsky

Copy link
Copy Markdown

What is now true

On asymmetric dual-CCD 3D V-Cache processors (e.g. Ryzen 9 9950X3D / 7950X3D, where all cores share one efficiency class and one L3 complex has ≥ 16 logical processors and a larger last-level cache than the other):

  • VICTORY_CACHE_CORES (on by default; 0 disables): place_process() sets the process default CPU sets (SetProcessDefaultCpuSets) to the larger-cache CCD (unless the process was started with an explicit affinity mask), and moves background pipeline compilers (victory-pipelines), DirectStorage workers (dstorage), and D3D runtime D3D Background Thread shader compiles to the other CCD.
  • VICTORY_SUBMIT_CORE (1 by default, 0 disables, ccd1 pins to the frequency CCD): carves one physical V-Cache core (both SMT siblings removed from the process default CPU sets via CoreIndex) and pins the single victory-submit thread to its primary logical processor at THREAD_PRIORITY_HIGHEST (overridable via VICTORY_SUBMIT_PRIORITY=-2..2).
  • Single-CCD, symmetric dual-CCD, and hybrid Intel CPUs are unaffected (split() returns None and falls back to existing keep_on_fast_cores behavior).

Relation to open PRs

Unlike #603 and #730 (which pin selected threads to one die on symmetric dual-CCD Ryzens), this targets asymmetric 3D V-Cache parts specifically: keeping both the title's threads and list translators on the 96 MB V-Cache CCD while removing SMT sibling contention from victory-submit and offloading background compiles / DirectStorage to the other CCD.

Measured on

  • Hardware: AMD Ryzen 9 9950X3D (CCD0 8C/16T 96 MB L3, CCD1 8C/16T 32 MB L3), NVIDIA RTX 5090 32 GB, 62 GB RAM, Windows 11.
  • Settings: 1440p SDR, DLSS Quality, Frame Generation OFF, warm pipeline cache, x86-64-v3 fat-LTO build, identical 90 s intro sequence (VICTORY_KEYS=10:Enter,13:Enter), steady 3D seconds in DLSS frames 100..1800 (<80 ms).

Directly on main (63b902f) — MEASURED

Build Median ms (FPS) p95 ms victory-submit refreshes / steps card_before Thin CPU-sum GPU busy
main (63b902f) 34.20 ms (29.2 fps) 43.10 ms 34.10 ms 8.40 / 13.60 ms 5.60 ms 163.7 ms 53%
This PR (7fe27ae) 27.00 ms (37.0 fps) 35.50 ms 26.60 ms 6.90 / 10.50 ms 4.60 ms 113.4 ms 66%
Delta −7.20 ms (+26.7% FPS) −7.60 ms −7.50 ms −1.50 / −3.10 ms −1.00 ms −30.7% +13 pp

Component A/B (isolating CCD0 V-Cache vs CCD1 clock) — MEASURED

On a branch with VICTORY_CACHE_CORES=1 already active:

  • Shared V-Cache cores (VICTORY_SUBMIT_CORE=0 equivalent baseline): 28.80 ms (34.7 fps), p95 36.95 ms
  • Dedicated V-Cache core (VICTORY_SUBMIT_CORE=1, default): 25.90 ms (38.6 fps), p95 32.10 ms (−10.1% frame time)
  • Dedicated frequency CCD1 core (VICTORY_SUBMIT_CORE=ccd1): 33.00 ms (30.3 fps), p95 44.05 ms (confirms victory-submit is heavily L3/V-Cache bound)
  • Offloading victory-list or victory-land to CCD1 regressed p95 due to cross-CCD coherence traffic, so both stay on the remaining 7 V-Cache cores.

CI / Tests

  • cargo run --locked -p xtask -- policy: 294 files ok
  • cargo xwin clippy --locked -p victory-gpu --all-targets (default & --all-features): 0 warnings in touched files
  • cargo xwin clippy --locked -p victory-hle --all-targets (default & --all-features): 0 warnings in touched files
  • Native Windows unit tests: victory-gpu (454 passed, 0 failed, including cores::tests::the_cores_under_the_larger_cache_are_told_apart), victory-hle (188 passed, 0 failed)

… on a dedicated core

On dual-CCD 3D V-Cache processors (e.g. Ryzen 9 9950X3D / 7950X3D, where
all cores share one efficiency class and one L3 complex has >= 16 logical
processors and a larger cache than the other):

- Place the process default CPU sets on the larger-cache half
  (VICTORY_CACHE_CORES=0 disables) and move background pipeline makers,
  DirectStorage workers, and D3D Background Thread shader compiles to the
  other half.
- Carve one physical V-Cache core (removing both SMT siblings from the
  process default CPU sets) and pin victory-submit to its primary logical
  processor at THREAD_PRIORITY_HIGHEST (VICTORY_SUBMIT_CORE=1|0|ccd1,
  VICTORY_SUBMIT_PRIORITY=-2..2).
@Bazovsky

Copy link
Copy Markdown
Author

Follow-up measurements on AMD Ryzen 9 9950X3D + RTX 5090 (1440p SDR, DLSS Quality, Frame Gen OFF) confirming clean mergeability onto latest main (9300875) and showing how CCD0 V-Cache placement + dedicated victory-submit core compose with subsequent CPU optimizations (#1094 and downstream scratch/refresh work).

All runs below use identical 90 s warm-cache intro sequences (VICTORY_KEYS=10:Enter,13:Enter), steady 3D seconds in DLSS frames 100..1800 (<80 ms):

Configuration Median ms (FPS) p95 ms Submit thr Prep total ref / steps Thin trans CPU-sum GPU busy max DLSS (90 s)
main (63b902f, CACHE_CORES=0) 34.20 ms (29.2 fps) 43.10 ms 34.10 ms 32.80 ms 8.40 / 13.60 ms 163.7 ms 53% 1,612
CACHE_CORES=1 only (no dedicated submit core) 32.15 ms (31.1 fps) 40.90 ms 32.10 ms 31.25 ms 7.70 / 12.60 ms 122.6 ms 58% 1,767
This PR (7fe27ae) directly on main 27.00 ms (37.0 fps) 35.50 ms 26.60 ms 25.90 ms 6.90 / 10.50 ms 113.4 ms 66% —
This PR + 5 upstream GPU PRs (P1a) 25.90 ms (38.6 fps) 32.10 ms 25.70 ms 25.00 ms 7.80 / 12.50 ms 115.2 ms 63% 1,878
+ #1094 lock-free refresh/pool (P2d) 24.20 ms (41.3 fps) 31.20 ms 23.80 ms 22.70 ms 6.80 / 11.30 ms 110.6 ms 67% 1,936
+ Downstream V-Cache HostList::scratch L0 (Wave E) 23.65 ms (42.3 fps) 32.75 ms 23.40 ms 22.80 ms 6.75 / 11.00 ms 101.9 ms 68% 1,949

Key takeaways from extended testing:

  • Pinning the process to CCD0 cuts Thin trans CPU-sum by ~25–31% (163.7 → 113.4–122.6 ms) by eliminating cross-CCD coherence traffic, and carving one physical V-Cache core for victory-submit removes SMT sibling contention on top of that (32.15 → 27.00 ms directly on main).
  • Keeping victory-submit and HostList scratch buffers resident in the 96 MB 3D V-Cache CCD makes downstream CPU optimizations measurably more effective (zero cross-CCD run-to-run jitter).
  • 0 crashes, 0 device removals, 0 errors across 15+ consecutive runs.

@Rafa7046

Copy link
Copy Markdown
Contributor

The same CPU as yours (9950X3D), with an RTX 5080. Measured on a scripted run, RT off, main at e7d8150 plus this PR only. The script plays the prologue cutscenes, then stands one minute on Jason's boat. Reference: four sessions of plain main the same afternoon.

Cutscenes fps Boat fps Preparing (boat)
main (4 sessions, mean) 51.5 37.2 20.1 ms
#1093 as is (2 sessions) 37.2 / 39.0 42.5 / 41.9 16.8 / 16.7 ms
VICTORY_SUBMIT_CORE=0 31.4 41.6 17.5 ms
VICTORY_SUBMIT_CORE=ccd1 33.5 40.7 18.1 ms
  • Boat (steady scene): about +13%, the largest gain of the thread PRs I measured.
  • Cutscenes: they lose 25–40%. In the second cutscene the fps goes from about 33 to about 22.
  • The dedicated submit core changes little either way. Both the gain and the loss follow the process being confined to the V-Cache CCD. My guess is that the title's own threads, which stream and animate heavily in cutscenes, run short with 8 cores minus one.

A switch that confines only the runtime's threads and leaves the title's free might keep the boat's gain without the cutscenes' loss. I can measure one if you add it.

Also worth knowing when measuring this: with the game window minimized, the AMD V-Cache driver no longer treats the game as the foreground game. Two of my runs were void because of that.

Measurements prepared with an AI assistant (Claude Code); the runs were played on my machine.

@trustno1-coder
trustno1-coder merged commit 6da8e37 into trustno1-coder:main Nov 28, 2026
@SkylerizMe

Copy link
Copy Markdown

For other X3D owners: BIOS settings like MSI's "X3D Gaming Mode" or Gigabyte's "X3D Turbo Mode" leave Windows 8 logical processors (second CCD and SMT off). Then this placement does nothing: it needs a part with the larger cache and 16 or more logical processors, and otherwise logs "no larger cache on a part of 16 logical processors or more: the process is not placed". The same happens with msconfig's "Number of processors" set to 16.

9950X3D + RTX 5080 (driver 621.10), Windows 11, Series S 960x540, DLSS Performance, DLSS frame generation 2x, warm cache, about 5 minutes in the opening:

Gaming Mode on (8 processors), older build Gaming Mode off (32), 923e38c with this placement
Median fps 29.0 36.5
After the first 2 minutes 31.5 38.7
Slowest 10% 23.5 30.6
Preparing per frame (median) 26.5 ms 18.8 ms

With 32 processors, the log shows the process on 0xfffc and victory-submit on its own core.

Caveat: the build changed at the same time (an older build based on VIctory-NVIDIA f4608f0 → 923e38c + #1444 and a few local additions), so not all of that gain is this PR. It does mean that leaving Gaming Mode on loses this placement entirely.

(Written with Claude; numbers are from this PC's logs.)

@Rafa7046

Copy link
Copy Markdown
Contributor

Following up on my earlier numbers, now on main after the merge (923e38c), with the same machine and script:

  • Placed (the default), 3 sessions: median 27.9 / 28.8 / 24.9 fps, cutscenes 36.2 / 40.2 / 34.9, boat 43.2 / 43.2 / 41.1.
  • VICTORY_CACHE_CORES=0, 2 sessions: median 38.8 / 37.9, cutscenes 53.1 / 54.0, boat 39.3 / 39.0.

On a 9950X3D the default costs about 28% of the median over the run, against +9% on the steady boat. I opened #1662 to make it opt-in. I'm happy to measure a narrower placement if you have one in mind.

Measurements prepared with an AI assistant (Claude Code); the runs were played on my machine.

0xA110C pushed a commit to 0xA110C/VIctory-NVIDIA that referenced this pull request Nov 28, 2026
On a 9950X3D (the CPU trustno1-coder#1093 was written for) with an RTX 5080, main at
923e38c, RT off, the prologue's cutscenes then a minute on Jason's boat,
alternating runs: placed (the default until now) median 27.9 / 28.8 / 24.9
fps, cutscenes 36.2 / 40.2 / 34.9, boat 43.2 / 43.2 / 41.1; not placed
median 38.8 / 37.9, cutscenes 53.1 / 54.0, boat 39.3 / 39.0. The steady
boat gains about 9 %, the run as a whole loses 28 % of its median.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants