perf(cores): avoid pinning shared workers on hybrid CPUs #3416

Manually merged
github merged 1 commit from github-bot/gh-3416 into gh-pr/3416/base 2026-11-30 14:16:35 +00:00 AGit
Owner

@⁠wrq2007 on GitHub · 2026-11-29 22:59 UTC · original
wrq2007:perf/hybrid-helper-affinity-stage1 → main · +5 −5 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC

Summary

  • Change the default VICTORY_FAST_CORES stage from 2 to 1.
  • Frame-critical threads remain on the fastest CPU class, while shared workers stay on the Windows scheduler so hybrid CPUs can use their slower cores.
  • Explicit VICTORY_FAST_CORES=2 or 3 retains the previous behaviour. Homogeneous CPUs are unchanged because no faster subset exists.

Validation

  • cargo test --release --locked -p victory-gpu cores::tests: 3 passed, 2 ignored.
  • Staged asset-policy check passed.
  • Real-title static A/B, windowed Series S / 540p / DLSS Performance / FrameGen 0, BVH builder enabled, hot cache, two paired rounds in opposite order:
Metric Default stage 2 Stage 1
FPS, two runs 6.18 / 7.66 7.42 / 9.95
Mean p50 frame time 126.22 ms 97.05 ms
Mean p95 frame time 342.24 ms 252.91 ms
Mean GPU wait 45.12 ms 25.27 ms
Mean draws/frame 4182.68 4246.30

A separate .03 build with the new default and no environment override measured 7.80 FPS, 108.93 ms p50 and 259.65 ms p95.

Moving-route follow-up

Short moving-route runs were not stable enough for adoption: default measured 6.53 and 8.39 FPS; stage 1 measured 5.12 FPS in one valid run and OOM-exited before gameplay in the repeat. Draw and texture workloads also differed. This PR therefore remains a draft pending an aligned moving-route comparison.

No run had a device removal. OOM counts varied from 4 to 25 on both settings, so this PR does not claim an OOM improvement.

CI note

The current Clippy job fails on the pre-existing victory-loader::crash::unwind_copy dead-code warning, unrelated to this cores.rs change. The focused cores tests and staged policy check pass.

This is a CPU scheduling optimisation, not a claim of stable 15 FPS.

**@⁠wrq2007** on GitHub · 2026-11-29 22:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3416) `wrq2007:perf/hybrid-helper-affinity-stage1` → `main` · +5 −5 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC ## Summary - Change the default `VICTORY_FAST_CORES` stage from `2` to `1`. - Frame-critical threads remain on the fastest CPU class, while shared workers stay on the Windows scheduler so hybrid CPUs can use their slower cores. - Explicit `VICTORY_FAST_CORES=2` or `3` retains the previous behaviour. Homogeneous CPUs are unchanged because no faster subset exists. ## Validation - `cargo test --release --locked -p victory-gpu cores::tests`: 3 passed, 2 ignored. - Staged asset-policy check passed. - Real-title static A/B, windowed Series S / 540p / DLSS Performance / FrameGen 0, BVH builder enabled, hot cache, two paired rounds in opposite order: | Metric | Default stage 2 | Stage 1 | |---|---:|---:| | FPS, two runs | 6.18 / 7.66 | 7.42 / 9.95 | | Mean p50 frame time | 126.22 ms | 97.05 ms | | Mean p95 frame time | 342.24 ms | 252.91 ms | | Mean GPU wait | 45.12 ms | 25.27 ms | | Mean draws/frame | 4182.68 | 4246.30 | A separate `.03` build with the new default and no environment override measured 7.80 FPS, 108.93 ms p50 and 259.65 ms p95. ## Moving-route follow-up Short moving-route runs were not stable enough for adoption: default measured 6.53 and 8.39 FPS; stage 1 measured 5.12 FPS in one valid run and OOM-exited before gameplay in the repeat. Draw and texture workloads also differed. This PR therefore remains a draft pending an aligned moving-route comparison. No run had a device removal. OOM counts varied from 4 to 25 on both settings, so this PR does not claim an OOM improvement. ## CI note The current Clippy job fails on the pre-existing `victory-loader::crash::unwind_copy` dead-code warning, unrelated to this `cores.rs` change. The focused cores tests and staged policy check pass. This is a CPU scheduling optimisation, not a claim of stable 15 FPS.
Hybrid CPUs were pinning submit helpers and shared workers to the same
small fastest-core class. Keep frame-critical threads there, but let the
scheduler place shared work across all cores by default.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 23:04:11 +00:00
Author
Owner

@⁠KampeLoL on GitHub · 2026-11-29 23:57 UTC · original

Data point from an Intel Arrow Lake hybrid CPU without Hyper-Threading (Core Ultra 9 275HX: 8 P-cores without SMT + 16 E-cores = 24 logical CPUs) + RTX 5090 Laptop (24 GB, driver 621.14.0), Windows 11 build 26300:

On 275HX, available_parallelism() is 24, while fast_of(&cpu_sets()) has only 8 entries (fast=8 of=24), not 16 as on HT-enabled P-core chips like the i9-14900K. Because VICTORY_FAST_CORES defaults to 2 (keep_helper_on_fast_cores), victory-wide (which scales to 8 threads on a 24-thread CPU) and victory-land (3 workers by default, or 7 with VICTORY_LAND_THREADS=8) are all pinned onto the same 8 P-core threads alongside the stage-1 threads and the title's own threads, while all 16 E-cores sit outside the fast set.

Verbatim victory_gpu::cores lines from a 5h 24m v2026.11.28.03 play log (Series S, VICTORY_LAND_THREADS=8, same cores.rs stage-2 default as current main):

2026-11-29T15:56:09.325352Z  INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-submit" fast=8 of=24
2026-11-29T15:56:09.599683Z  INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-late-wait" fast=8 of=24
2026-11-29T15:56:09.599909Z  INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-heap-sync" fast=8 of=24
2026-11-29T15:56:09.600329Z  INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-wide" fast=8 of=24
... (8x victory-wide total)
2026-11-29T15:56:09.602266Z  INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-relay" fast=8 of=24
2026-11-29T15:56:45.447757Z  INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-land" fast=8 of=24
... (7x victory-land total)
2026-11-29T15:56:45.451480Z  INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-aside" fast=8 of=24

That is 20 threads (16 even with default VICTORY_LAND_THREADS) contending for 8 non-SMT P-cores. Supporting VICTORY_FAST_CORES=1 as the default so victory-wide / victory-land can spill onto the 16 E-cores makes particular sense for Arrow Lake / no-SMT hybrid CPUs.

**@⁠KampeLoL** on GitHub · 2026-11-29 23:57 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3416#issuecomment-7264859603) Data point from an Intel Arrow Lake hybrid CPU without Hyper-Threading (**Core Ultra 9 275HX**: 8 P-cores without SMT + 16 E-cores = 24 logical CPUs) + RTX 5090 Laptop (24 GB, driver 621.14.0), Windows 11 build 26300: On `275HX`, `available_parallelism()` is `24`, while `fast_of(&cpu_sets())` has only **8** entries (`fast=8 of=24`), not 16 as on HT-enabled P-core chips like the i9-14900K. Because `VICTORY_FAST_CORES` defaults to `2` (`keep_helper_on_fast_cores`), `victory-wide` (which scales to `8` threads on a 24-thread CPU) and `victory-land` (3 workers by default, or 7 with `VICTORY_LAND_THREADS=8`) are all pinned onto the same 8 P-core threads alongside the stage-1 threads and the title's own threads, while all 16 E-cores sit outside the fast set. Verbatim `victory_gpu::cores` lines from a 5h 24m `v2026.11.28.03` play log (`Series S`, `VICTORY_LAND_THREADS=8`, same `cores.rs` stage-2 default as current `main`): ```text 2026-11-29T15:56:09.325352Z INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-submit" fast=8 of=24 2026-11-29T15:56:09.599683Z INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-late-wait" fast=8 of=24 2026-11-29T15:56:09.599909Z INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-heap-sync" fast=8 of=24 2026-11-29T15:56:09.600329Z INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-wide" fast=8 of=24 ... (8x victory-wide total) 2026-11-29T15:56:09.602266Z INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-relay" fast=8 of=24 2026-11-29T15:56:45.447757Z INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-land" fast=8 of=24 ... (7x victory-land total) 2026-11-29T15:56:45.451480Z INFO victory_gpu::cores: the thread is kept on the fast cores (VICTORY_FAST_CORES=0: not) what="victory-aside" fast=8 of=24 ``` That is **20 threads** (16 even with default `VICTORY_LAND_THREADS`) contending for 8 non-SMT P-cores. Supporting `VICTORY_FAST_CORES=1` as the default so `victory-wide` / `victory-land` can spill onto the 16 E-cores makes particular sense for Arrow Lake / no-SMT hybrid CPUs.
Author
Owner

@⁠wrq2007 on GitHub · 2026-11-30 01:04 UTC · original · edited 2026-11-30 04:19 UTC

Thanks for the 275HX log — it matches the failure mode this PR targets: fast=8 of=24, with stage 2 pinning victory-wide / victory-land onto the same 8 P-cores while the 16 E-cores stay outside the fast set. The (VICTORY_FAST_CORES=0: not) suffix is static text in that log line, not the active value.

Correction: victory-aside uses the stage-1 path, so it remains pinned under both stage 1 and stage 2. The default change only unpins the victory-wide and victory-land helper threads. Submit, late-wait, heap-sync, relay and aside stay on the fast set; send, late-fills and ask also stay there when enabled. With your VICTORY_LAND_THREADS=8 log, that means 20 pinned threads under stage 2 become 5 under stage 1: 8 victory-wide and 7 victory-land helpers move back to the Windows scheduler. Explicit VICTORY_FAST_CORES=2 or 3 keeps the old behaviour; CPUs without a faster subset are unchanged.

The static A/B is repeatable: mean p50 improved from 126.22 ms to 97.05 ms and p95 from 342.24 ms to 252.91 ms across two paired rounds in opposite order. A separate .03 no-env confirmation measured 7.80 FPS / 108.93 ms p50 / 259.65 ms p95. The PR remains Draft because our moving-route follow-up was not decision-grade: one stage-1 run regressed and the repeat hit physical-memory exhaustion before a stable window.

Since you have the exact 275HX topology, a paired moving A/B on your machine would be the strongest next data point: same build, save, cache and world-relative route; VICTORY_FAST_CORES=2 vs =1; reversed order; measurement aligned to the world: the first frame of 500 draws or more plus a fixed window. Please keep VICTORY_LAND_THREADS identical between the two settings, and include valid-window and real-present counts, FPS, p50/p95, draws/frame, OOM count and device-removal status. If stage 1 holds on moving as well, we can promote the PR out of Draft.

**@⁠wrq2007** on GitHub · 2026-11-30 01:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3416#issuecomment-7265813474) · edited 2026-11-30 04:19 UTC Thanks for the 275HX log — it matches the failure mode this PR targets: `fast=8 of=24`, with stage 2 pinning `victory-wide` / `victory-land` onto the same 8 P-cores while the 16 E-cores stay outside the fast set. The `(VICTORY_FAST_CORES=0: not)` suffix is static text in that log line, not the active value. Correction: `victory-aside` uses the stage-1 path, so it remains pinned under both stage 1 and stage 2. The default change only unpins the `victory-wide` and `victory-land` helper threads. Submit, late-wait, heap-sync, relay and aside stay on the fast set; send, late-fills and ask also stay there when enabled. With your `VICTORY_LAND_THREADS=8` log, that means 20 pinned threads under stage 2 become 5 under stage 1: 8 `victory-wide` and 7 `victory-land` helpers move back to the Windows scheduler. Explicit `VICTORY_FAST_CORES=2` or `3` keeps the old behaviour; CPUs without a faster subset are unchanged. The static A/B is repeatable: mean p50 improved from 126.22 ms to 97.05 ms and p95 from 342.24 ms to 252.91 ms across two paired rounds in opposite order. A separate `.03` no-env confirmation measured 7.80 FPS / 108.93 ms p50 / 259.65 ms p95. The PR remains Draft because our moving-route follow-up was not decision-grade: one stage-1 run regressed and the repeat hit physical-memory exhaustion before a stable window. Since you have the exact 275HX topology, a paired moving A/B on your machine would be the strongest next data point: same build, save, cache and world-relative route; `VICTORY_FAST_CORES=2` vs `=1`; reversed order; measurement aligned to `the world: the first frame of 500 draws or more` plus a fixed window. Please keep `VICTORY_LAND_THREADS` identical between the two settings, and include valid-window and real-present counts, FPS, p50/p95, draws/frame, OOM count and device-removal status. If stage 1 holds on moving as well, we can promote the PR out of Draft.
github-bot changed target branch from main to gh-pr/3416/base 2026-11-30 14:16:21 +00:00
github manually merged commit 50437da056 into gh-pr/3416/base 2026-11-30 14:16:22 +00:00
Author
Owner

@⁠KampeLoL on GitHub · 2026-11-30 17:20 UTC · original

Thanks for the follow-up @⁠wrq2007, and glad to see #3416 (67fa153f — VICTORY_FAST_CORES=1 default) landed in v2026.11.30.02!

I just installed clean v2026.11.30.02 on our Core Ultra 9 275HX (fast=8 of=24: 8 non-SMT P-cores + 16 E-cores) + RTX 5090 Laptop 24 GB (Windows 11) rig. If a post-merge moving A/B on 275HX is still useful for your notes or follow-up tuning, let me know — I'd be happy to run the paired VICTORY_FAST_CORES=2 vs =1 test in reversed order (identical VICTORY_LAND_THREADS, aligned to the world: the first frame of 500 draws or more) and report FPS, p50/p95, draws/frame, real presents, and OOM/device-removal status. Feel free to mention which console profile / FG flags you'd prefer checked.

**@⁠KampeLoL** on GitHub · 2026-11-30 17:20 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3416#issuecomment-7286117403) Thanks for the follow-up @⁠wrq2007, and glad to see #3416 (`67fa153f` — `VICTORY_FAST_CORES=1` default) landed in `v2026.11.30.02`! I just installed clean `v2026.11.30.02` on our **Core Ultra 9 275HX** (`fast=8 of=24`: 8 non-SMT P-cores + 16 E-cores) + **RTX 5090 Laptop 24 GB** (Windows 11) rig. If a post-merge moving A/B on 275HX is still useful for your notes or follow-up tuning, let me know — I'd be happy to run the paired `VICTORY_FAST_CORES=2` vs `=1` test in reversed order (identical `VICTORY_LAND_THREADS`, aligned to `the world: the first frame of 500 draws or more`) and report FPS, p50/p95, draws/frame, real presents, and OOM/device-removal status. Feel free to mention which console profile / FG flags you'd prefer checked.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

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