Cores: VICTORY_SLOW_CORES keeps the list translators on the slow cores of a hybrid processor (opt-in) #4069

Open
kMagic142 wants to merge 2 commits from upstream-pr/4069 into main
kMagic142 commented 2026-11-30 15:30:31 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kMagic142 on 2026-11-30T15:30:31Z.


What it changes

On a processor with fast and slow cores, cores.rs keeps the threads a frame waits for on the fast cores (VICTORY_FAST_CORES, stage 2 by default). The eight list translators (victory-list-*) ask for no cores below stage 3, so Windows runs them on fast and slow cores alike, and they compete for the fast cores with the submitting thread and its helpers. Stage 3 puts them on the fast cores, which measured worse (table below).

VICTORY_SLOW_CORES (unset or 0: nothing changes):

  • 1: the list translators ask for the slow cores' CPU sets (keep_list_worker), whatever VICTORY_FAST_CORES says of them. Their priority does not change: it comes from VICTORY_LIST_PRIORITY or VICTORY_HELPER_PRIORITY as before, so it is above normal in victory play.
  • 2: also victory-late-wait, victory-heap-sync and the victory-records / victory-views pools (a check in ask). This part came from a profile and was never timed on its own. It is the second commit and can be dropped.

The submitting, sending and relay threads and the refresh helpers stay where VICTORY_FAST_CORES puts them. The title's threads are not touched. If every core is in one efficiency class, slow_of finds no slow cores and the switch does nothing. VICTORY_CACHE_CORES only places processors of that kind, so the two switches never apply on the same processor.

The slow cores are the CPU sets of every efficiency class below the fastest. slow_of sits next to fast_of and reads the same GetSystemCpuSetInformation records. There are two new checks: one test for slow_of, and one that no thread a frame waits for is in the stage-2 list.

How it was tested

  • GPU and profile: RTX 5090, Core Ultra 9 285K (8 fast cores, 16 slow, 24 logical processors); Series X, 1440p, DLSS Quality, no frame generation, ray tracing as victory play sets it.
  • Not measured on main. Every number below comes from builds of v2026.11.28.03 with 250 to 390 commits of our own changes. On that tree a local placement switch did what stage 1 does here: the translators on the slow cores, and the threads a frame waits for on the fast ones. That tag applies the title's thread affinities as the title asks for them. On main that is VICTORY_TITLE_AFFINITY=keep, not the default fast (see the last point).
  • Shot: the opening's steady cutscene (4,700-5,250 draws a frame), in 47-second runs. Each number is the mean ms a frame over the first four one-second windows in that draw range, which are the same windows in every run. Two runs of one build without a change differed by 0.03-0.25 ms. There is one run per row.
Build Our threads ms a frame
1 as main places them (translators on no particular cores) 19.12, 19.15
1 translators on the slow cores (stage 1) 18.35
2 as main places them 18.62, 18.50
2 stage 1 18.07
2 as main, VICTORY_HELPER_PRIORITY=1 given 18.60
2 stage 1, VICTORY_HELPER_PRIORITY=1 given 17.93
3 stage 1 17.98, 18.05
3 two translators on the fast cores, six on the slow ones 18.82
1 every thread of ours on logical processors 14-23, which the title's own masks never name 23.90
0 as main places them 19.05, 19.23
0 only submit, send and relay on the fast cores; every other thread of ours, refresh helpers included, on the slow ones 20.33
0 the title's affinities not applied (free) 20.57
0 free and translators on the fast cores (VICTORY_FAST_CORES=3) 26.00
  • Stage 2 was first in a later build. That build ran the shot at about 17.9 ms, as the build before it did (17.65-17.88), but stage 2 was never compared against stage 1 in the same build. It moves heap-sync, whose rounds the submitting thread waits for. On our tree that wait was 0.07 ms a frame. On main it may be larger.
  • With main's default title affinity: on the same tree, with stage 1 on, we tried a local equivalent of main's fast remap with #2803's spread. That puts the title's 0xff workers on the 8 fast cores and its other pools on the slow cores. The shot ran at 22.62 ms against 17.65 and 17.88 with the title's affinities applied as asked. We did not measure main's own remap, and we do not know what stage 1 does under it.
  • Not tested:
    • this branch in the game;
    • any other hybrid processor: fast cores with SMT, fewer than 8 slow cores (the eight translators would share them), laptops;
    • Windows 10;
    • Wine or Proton, where SetThreadSelectedCpuSets is accepted but not applied (#2039), so the switch does nothing there.
  • For shader changes, the wave sizes tested: not a shader change.
  • cargo test passed for the crates it touches: yes, on main (41adb551) with this branch applied: cargo xwin check -p victory passes, and victory-gpu's cores::tests pass (4 passed, 0 failed, 2 ignored), the new the_slow_cores_are_all_but_the_fast_ones_if_there_are_fast_ones among them.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches (cores.rs, hybrid, fast/slow cores, affinity, placement). Related:
    • #3416 (draft) moves VICTORY_FAST_CORES's default from 2 to 1, so the pools stop asking for the fast cores. It does not place the translators, and the two patches apply to main together.
    • #2803 spreads the title's pools over the slow cores under VICTORY_TITLE_AFFINITY=fast. On a 265KF it found our translators, roaming the slow cores above normal, putting those pools aside. Under stage 1 the translators share the slow cores with those pools. We have not measured that combination: our numbers are with the title's affinities as asked.
    • #1913 keeps a P-core for victory-submit on hybrid processors. #2039 backs fast-core requests with an affinity mask under Wine. Both change ask / keep_submit_core, and neither applies to main any more as it stands. This PR does not touch the submitting thread.
    • #2301 (VICTORY_HELPERS_RAISED) and #3513 (VICTORY_SPLIT_CCD, two-CCD Ryzens) each apply to main together with this one.
    • docs/rig-launcher.md's -Cores pcores sets the process's default CPU sets to the fast cores. A thread's own selected sets win over the process's, so with both on, the translators still go to the slow cores. That page already notes that the translators measured better off the fast cores.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5568317862 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4069). Originally posted by [kMagic142](https://github.com/kMagic142) on 2026-11-30T15:30:31Z. --- ## What it changes On a processor with fast and slow cores, `cores.rs` keeps the threads a frame waits for on the fast cores (`VICTORY_FAST_CORES`, stage 2 by default). The eight list translators (`victory-list-*`) ask for no cores below stage 3, so Windows runs them on fast and slow cores alike, and they compete for the fast cores with the submitting thread and its helpers. Stage 3 puts them on the fast cores, which measured worse (table below). `VICTORY_SLOW_CORES` (unset or `0`: nothing changes): - `1`: the list translators ask for the slow cores' CPU sets (`keep_list_worker`), whatever `VICTORY_FAST_CORES` says of them. Their priority does not change: it comes from `VICTORY_LIST_PRIORITY` or `VICTORY_HELPER_PRIORITY` as before, so it is above normal in `victory play`. - `2`: also `victory-late-wait`, `victory-heap-sync` and the `victory-records` / `victory-views` pools (a check in `ask`). This part came from a profile and was never timed on its own. It is the second commit and can be dropped. The submitting, sending and relay threads and the refresh helpers stay where `VICTORY_FAST_CORES` puts them. The title's threads are not touched. If every core is in one efficiency class, `slow_of` finds no slow cores and the switch does nothing. `VICTORY_CACHE_CORES` only places processors of that kind, so the two switches never apply on the same processor. The slow cores are the CPU sets of every efficiency class below the fastest. `slow_of` sits next to `fast_of` and reads the same `GetSystemCpuSetInformation` records. There are two new checks: one test for `slow_of`, and one that no thread a frame waits for is in the stage-2 list. ## How it was tested - GPU and profile: RTX 5090, Core Ultra 9 285K (8 fast cores, 16 slow, 24 logical processors); Series X, 1440p, DLSS Quality, no frame generation, ray tracing as `victory play` sets it. - **Not measured on main.** Every number below comes from builds of `v2026.11.28.03` with 250 to 390 commits of our own changes. On that tree a local placement switch did what stage 1 does here: the translators on the slow cores, and the threads a frame waits for on the fast ones. That tag applies the title's thread affinities as the title asks for them. On main that is `VICTORY_TITLE_AFFINITY=keep`, not the default `fast` (see the last point). - Shot: the opening's steady cutscene (4,700-5,250 draws a frame), in 47-second runs. Each number is the mean ms a frame over the first four one-second windows in that draw range, which are the same windows in every run. Two runs of one build without a change differed by 0.03-0.25 ms. There is one run per row. | Build | Our threads | ms a frame | |---|---|---:| | 1 | as main places them (translators on no particular cores) | 19.12, 19.15 | | 1 | translators on the slow cores (stage 1) | **18.35** | | 2 | as main places them | 18.62, 18.50 | | 2 | stage 1 | **18.07** | | 2 | as main, `VICTORY_HELPER_PRIORITY=1` given | 18.60 | | 2 | stage 1, `VICTORY_HELPER_PRIORITY=1` given | **17.93** | | 3 | stage 1 | 17.98, 18.05 | | 3 | two translators on the fast cores, six on the slow ones | 18.82 | | 1 | every thread of ours on logical processors 14-23, which the title's own masks never name | 23.90 | | 0 | as main places them | 19.05, 19.23 | | 0 | only submit, send and relay on the fast cores; every other thread of ours, refresh helpers included, on the slow ones | 20.33 | | 0 | the title's affinities not applied (`free`) | 20.57 | | 0 | `free` and translators on the fast cores (`VICTORY_FAST_CORES=3`) | 26.00 | - Stage 2 was first in a later build. That build ran the shot at about 17.9 ms, as the build before it did (17.65-17.88), but stage 2 was never compared against stage 1 in the same build. It moves heap-sync, whose rounds the submitting thread waits for. On our tree that wait was 0.07 ms a frame. On main it may be larger. - With main's default title affinity: on the same tree, with stage 1 on, we tried a local equivalent of main's `fast` remap with #2803's spread. That puts the title's `0xff` workers on the 8 fast cores and its other pools on the slow cores. The shot ran at 22.62 ms against 17.65 and 17.88 with the title's affinities applied as asked. We did not measure main's own remap, and we do not know what stage 1 does under it. - Not tested: - this branch in the game; - any other hybrid processor: fast cores with SMT, fewer than 8 slow cores (the eight translators would share them), laptops; - Windows 10; - Wine or Proton, where `SetThreadSelectedCpuSets` is accepted but not applied (#2039), so the switch does nothing there. - For shader changes, the wave sizes tested: not a shader change. - `cargo test` passed for the crates it touches: yes, on main (41adb551) with this branch applied: `cargo xwin check -p victory` passes, and `victory-gpu`'s `cores::tests` pass (4 passed, 0 failed, 2 ignored), the new `the_slow_cores_are_all_but_the_fast_ones_if_there_are_fast_ones` among them. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches (`cores.rs`, hybrid, fast/slow cores, affinity, placement). Related: - #3416 (draft) moves `VICTORY_FAST_CORES`'s default from 2 to 1, so the pools stop asking for the fast cores. It does not place the translators, and the two patches apply to main together. - #2803 spreads the title's pools over the slow cores under `VICTORY_TITLE_AFFINITY=fast`. On a 265KF it found our translators, roaming the slow cores above normal, putting those pools aside. Under stage 1 the translators share the slow cores with those pools. We have not measured that combination: our numbers are with the title's affinities as asked. - #1913 keeps a P-core for `victory-submit` on hybrid processors. #2039 backs fast-core requests with an affinity mask under Wine. Both change `ask` / `keep_submit_core`, and neither applies to main any more as it stands. This PR does not touch the submitting thread. - #2301 (`VICTORY_HELPERS_RAISED`) and #3513 (`VICTORY_SPLIT_CCD`, two-CCD Ryzens) each apply to main together with this one. - `docs/rig-launcher.md`'s `-Cores pcores` sets the process's default CPU sets to the fast cores. A thread's own selected sets win over the process's, so with both on, the translators still go to the slow cores. That page already notes that the translators measured better off the fast cores.
nicolasabosch commented 2026-11-30 23:19:15 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nicolasabosch on 2026-11-30T23:19:15Z.


Tested on an RTX 4070 Laptop 8 GB with VICTORY_SLOW_CORES=1 and =2: no measurable fps difference in this scene (1 run each).

What was built

  • Main e1251c31 with four opt-in PRs merged together and nothing else changed: #4069, #3757, #3614 and #4206. This PR's head was 361c8965.
  • Release build, same profile as main.
  • Every switch was off except the one under test. The combined build with all switches off is the control.

Setup

  • PC: RTX 4070 Laptop 8 GB, i9-14900HX, 32 GB RAM, Windows 11.
  • Command: victory play --series-s --dlss performance --framegen 2, with no fps cap and the window minimized.
  • Route: scripted Enter presses into the world from a fixed copy of a save, then the character idles there for 300 s.
  • fps is the mean of the last 40 host: reports, about 200 s. These are real frames, not generated ones.
run fps ms/frame submit thread ms refreshes ms
main, 5 runs 15.94 – 16.41 61.0 – 62.8 38.4 – 40.5 14.2 – 15.2
combined build, switches off, run 1 16.45 60.8 35.4 12.4
combined build, switches off, run 2 16.93 59.2 37.3 13.9
VICTORY_SLOW_CORES=1, run 1 16.61 60.3 33.2 11.7
VICTORY_SLOW_CORES=2, run 2 16.54 60.5 33.0 11.7

On this laptop, identical runs differ by about 0.5–1 fps, so only an effect of roughly 1.5 fps or more would show.

In this scene the frame (~60 ms) is longer than the submit thread's own work (~33–40 ms), so a gain on the submit thread alone may not reach the fps here. The submit thread did get lighter with it, at 33.2 and 33.0 ms against 35.4 and 37.3 ms for the control, and refreshes fell from 12.5–13.9 to about 11.7 ms. The frame did not follow. CPU: i9-14900HX, 8 P-cores with hyper-threading and 16 E-cores.

Not tested: driving, camera turns, interiors, an image comparison, other GPUs.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7294977569 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4069#issuecomment-7294977569). Originally posted by [nicolasabosch](https://github.com/nicolasabosch) on 2026-11-30T23:19:15Z. --- **Tested on an RTX 4070 Laptop 8 GB with `VICTORY_SLOW_CORES=1` and `=2`: no measurable fps difference in this scene (1 run each).** **What was built** - Main `e1251c31` with four opt-in PRs merged together and nothing else changed: #4069, #3757, #3614 and #4206. This PR's head was `361c8965`. - Release build, same profile as main. - Every switch was off except the one under test. The combined build with all switches off is the control. **Setup** - PC: RTX 4070 Laptop 8 GB, i9-14900HX, 32 GB RAM, Windows 11. - Command: `victory play --series-s --dlss performance --framegen 2`, with no fps cap and the window minimized. - Route: scripted Enter presses into the world from a fixed copy of a save, then the character idles there for 300 s. - fps is the mean of the last 40 `host:` reports, about 200 s. These are real frames, not generated ones. | run | fps | ms/frame | submit thread ms | refreshes ms | |---|---|---|---|---| | main, 5 runs | 15.94 – 16.41 | 61.0 – 62.8 | 38.4 – 40.5 | 14.2 – 15.2 | | combined build, switches off, run 1 | 16.45 | 60.8 | 35.4 | 12.4 | | combined build, switches off, run 2 | 16.93 | 59.2 | 37.3 | 13.9 | | VICTORY_SLOW_CORES=1, run 1 | 16.61 | 60.3 | 33.2 | 11.7 | | VICTORY_SLOW_CORES=2, run 2 | 16.54 | 60.5 | 33.0 | 11.7 | On this laptop, identical runs differ by about 0.5–1 fps, so only an effect of roughly 1.5 fps or more would show. In this scene the frame (~60 ms) is longer than the submit thread's own work (~33–40 ms), so a gain on the submit thread alone may not reach the fps here. The submit thread did get lighter with it, at 33.2 and 33.0 ms against 35.4 and 37.3 ms for the control, and refreshes fell from 12.5–13.9 to about 11.7 ms. The frame did not follow. CPU: i9-14900HX, 8 P-cores with hyper-threading and 16 E-cores. **Not tested:** driving, camera turns, interiors, an image comparison, other GPUs.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4069:upstream-pr/4069'
git switch 'upstream-pr/4069'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/4069'
git switch 'upstream-pr/4069'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4069'
git switch 'upstream-pr/4069'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4069'
git switch 'main'
git merge --squash 'upstream-pr/4069'
git switch 'main'
git merge --ff-only 'upstream-pr/4069'
git switch 'main'
git merge 'upstream-pr/4069'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!4069
No description provided.