perf(cores,shadow): offload background workers to hybrid E-cores and cap wide_threads for non-SMT P-cores #4146
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4146
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4146"
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?
@Andreww2009 on GitHub · 2026-11-30 16:46 UTC · original
Andreww2009:perf/hybrid-ecore-offload-and-wide-cap→main· +143 −24 · 2 files · 1 commits · openSummary
VICTORY_HYBRID_OFFLOAD(default on;=0restores previous behavior) incrates/victory-gpu/src/cores.rsto route background worker pools andD3D Background Threadto efficiency cores on hybrid Intel CPUs instead of competing with frame-critical threads on P-cores.default_wide_threads(logical, fast_cores)incrates/victory-gpu/src/shadow.rscapping defaultwide_threads()atfast - 1on hybrid CPUs (fast > 2) sovictory-submit+victory-wide-*never oversubscribe P-cores (especially non-SMT Arrow Lake / Core Ultra 200HX), while leaving homogeneous CPUs unchanged.Problem
On hybrid Intel CPUs with non-SMT P-cores (for example Intel Core Ultra 9 275HX: 8 Lion Cove P-cores + 16 Skymont E-cores = 24 logical processors),
wide_threads()defaulted to(24 * 3 / 8).clamp(2, 8) = 8helper threads. Becausevictory-submititself participates inwide_each_scopedand runs at raised priority on fast cores, 9 hot-spinning threads contend for 8 physical P-cores, causing barrier preemption spikes on every refresh flush (VICTORY_PASSES_HOT=1) while 16 E-cores sit underutilized by background pools.Root Cause
wide_threads()only inspected total logical processor count (available_parallelism()) and did not account for hybrid fast-core counts.D3D Background Threadhad no hybrid E-core routing helper (VICTORY_HYBRID_OFFLOAD).Implementation
crates/victory-gpu/src/cores.rs: exposefast_core_count(), add hybrid E-core affinity helpers gated byVICTORY_HYBRID_OFFLOAD(default on;=0disables), and migrateD3D Background Threadonto E-cores when hybrid offloading is active.crates/victory-gpu/src/shadow.rs: factordefault_wide_threads(logical, fast_cores)so hybrid CPUs withfast > 2capwide_threads()atbase.min(fast - 1).max(2)(e.g., 7 helpers + 1victory-submit= 8 threads 1:1 on 8 P-cores of Core Ultra 9 275HX; 13600K = 7, 14900K = 8, homogeneous CPUs unchanged), with unit testhybrid_wide_threads_leave_a_fast_core_for_submit.Testing
cargo test --locked -p victory-gpu --lib cores::tests: 4 passed, 0 failed, 2 ignored.cargo test --locked -p victory-gpu --lib hybrid_wide_threads: 1 passed, 0 failed (wide_: 12 passed, 0 failed).cores.rsorshadow.rs.Performance Before and After
Measured with
cargo test --release --locked -p victory-gpu pass_overhead -- --ignored --nocaptureunderVICTORY_BENCH_LOAD=8(8 concurrent busy threads simulating title workload) on Intel Core Ultra 9 275HX (8P+16E no-SMT):VICTORY_PASSES_HOT=1)VICTORY_WIDE_THREADS=8, upstream default)19.4 us23.1 us0.47 msfast - 1cap)13.7 us(-29.4%)6.1 us(3.79x faster, -73.6%)0.33 ms(-29.8%)Hardware Configuration
Compatibility
fast_core_count() == Noneand follow the unchangedlogical * 3 / 8path.VICTORY_WIDE_THREADS=<n>orVICTORY_HYBRID_OFFLOAD=0overrides defaults cleanly.Risks and Limitations
Low. Live open-world gameplay frame pacing gains will vary depending on CPU bottleneck vs GPU bottleneck; synthetic
pass_overheadspecifically verifies eliminating P-core barrier oversubscription.Related Issues / Overlap Check
maincommits (84bd61e2). Complementary to #3416 (already merged:VICTORY_FAST_CORESstage default), #2803 (VICTORY_TITLE_SLOW_SPREADfor title threads inkernel.rs), and #4069 (VICTORY_SLOW_CORESopt-in for list translators).@Luca121 on GitHub · 2026-11-30 20:14 UTC · original
Hardware stability check on Intel hybrid (
i7-13700K, 8P+8E / 24 logical)How it was tested (integrated stack — not isolated A/B)
1113x626 -> 1920x1080, DLSS Balanced, DLSS FG 2x, RT Off04804ef6, 99.2m) —prepmed43.8 ms,gpuwait med11.3 ms,10.2med FPS (10.8 -> 9.9early->late)84bd61e2in an integrated multi-PR build): 39.9m gameplay (4105s samples withdraws >= 1000) — 0 crashes, 0 hangs/deadlocks, clean shutdown;prepmed35.4 ms,gpuwait med3.85 ms,submit_lock0.0 ms,lists_air0.0 ms,heapsmed1.2 ms;11.9med (9.3p10,23.3max),12.0 -> 16.55early->late base FPS,card_busy=96.0%cargo testpassed for the crates it touches:victory-gpu(1,170/1,173passed; 3 failures were unrelated/pre-existing in the integrated branch, none incores/shadowworker offload)Disclosure: tested in an integrated multi-PR build, so this confirms clean Intel 8P+8E stability/compatibility rather than isolated A/B delta.
@nicolasabosch on GitHub · 2026-11-30 21:52 UTC · original
Tested on an RTX 4070 Laptop 8 GB: no measurable fps difference in this scene (2 runs).
Tested on main
e1251c31with this PR (d4880bfe) merged on top and nothing else changed. Release build, same profile as main.Setup
victory play --series-s --dlss performance --framegen 2, with no fps cap and the window minimized.host:reports, about 200 s. These are real frames, not generated ones.On this laptop, identical main runs differ by up to about 2–2.5 fps, so only an effect of roughly 2–3 fps or more would be visible in this scene. This CPU is hybrid with hyper-threaded P-cores (8P+16E, 32 threads). Both runs sit at the low end of main's range, so a small cost can't be ruled out, but it isn't separable from noise either.
Not tested: driving, camera turns, interiors, an image comparison, other GPUs.
d4880bfeceto74088d6faeView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.