gpu(cores): add VICTORY_OWN_CPUS to pin emulator threads off title cache domain #202
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!202
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/202/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?
@Androtim on GitHub · 2026-11-30 05:29 UTC · original
Androtim:feat/iter199-cores-own-cpus→main· +76 −5 · 1 files · 1 commits · closed without mergingSummary
VICTORY_OWN_CPUSsupport (autoor<first>-<last>) invictory-gpu/src/cores.rsto pin emulator threads onto secondary cache domains or an explicit logical-processor range and set the process default CPU set, leaving the title's primary cache domain uncontended on dual-CCD systems whereVICTORY_FAST_CORESsees a single efficiency class.own_cpus_auto_is_the_other_cache_and_a_range_is_by_numberunit test coveringauto, explicit ranges, inverted ranges, and invalid inputs.Verification
cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policycargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib cores:: -- --test-threads=1cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warningscargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings@Androtim on GitHub · 2026-11-30 07:33 UTC · original
CI check is failing (
FAILURE); markingtriage: needs workso it can be fixed before GPU testing.@Androtim on GitHub · 2026-11-30 11:03 UTC · original
Automated triage for the maintainers (not an approval).
Verdict:
needs-work· CI (check):failingReview Summary
PR #202 adds opt-in
VICTORY_OWN_CPUS(autoor<first>-<last>) support incrates/victory-gpu/src/cores.rs, refactoringcpu_sets()ontogroup0_cpu_sets(), addingown_cpus(),chosen_of(), andcpu_logical(), wiringown_cpus()intoask(), and adding unit testown_cpus_auto_is_the_other_cache_and_a_range_is_by_number. The feature is opt-in (off whenVICTORY_OWN_CPUSis unset) and does not alter default behavior.Findings
VICTORY_OWN_CPUSvalues are silently ignored: Inown_cpus(),let chosen = chosen_of(asked, &all)?;returnsNonewithout logging whenaskedfails to parse (e.g., typos, inverted ranges, or a single CPU index), whereas empty or all-CPU matches emit atracing::warn!. Invalid values should also emit a warning for consistency.SetProcessDefaultCpuSetsscope &stage()bypass:own_cpus()callsSetProcessDefaultCpuSets(GetCurrentProcess(), ...)lazily on the firstask()call, which constrains all threads in the process lacking an explicit affinity/CPU set (not only emulator threads, if any title or driver threads run without explicit affinity).ask(), theif let Some(own) = own_cpus()branch returns beforeif stage() < from, soVICTORY_OWN_CPUSapplies to allkeep_*_on_fast_corescallers regardless ofVICTORY_FAST_CORES.own_cpus()can returnOption<&'static [u32]>via.as_deref()instead ofOption<&'static Vec<u32>>.Priority::keep(), the modified// SAFETY:comment citesself.applied != Some(on)rather than the actual Win32 safety invariant (callingSetThreadPriorityonGetCurrentThread()with a valid priority constant).To change the verdict:
tracing::warn!inown_cpus()whenVICTORY_OWN_CPUSis set butchosen_of()returnsNone(invalid syntax / inverted range).SetProcessDefaultCpuSets/stage()interaction (and optionally simplifyown_cpus()return type toOption<&'static [u32]>and restore/fix thePriority::keepsafety comment).Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-12-01 01:38 UTC · original
Closing conflicting opt-in VICTORY_* toggle PR per #276 policy (replace flawed base paths with default-on replacements rather than stacking opt-in toggles).
Pull request closed