Lane priority on processors whose cores are all alike #9

Manually merged
github merged 1 commit from github-bot/gh-9 into main 2026-12-04 01:57:17 +00:00 AGit
Owner

@⁠luannzin on GitHub · 2026-12-02 01:29 UTC · original
luannzin:lane-priority-equal-cores → main · +13 −6 · 1 files · 1 commits · merged 2026-12-04 01:54 UTC

What this changes

VICTORY_LANE_PRIORITY now also works on a processor whose cores are all alike. Only crates/victory-gpu/src/cores.rs changes.

cores::ask returned before it registered the calling thread when fast_sets came back empty, which it does on any processor with one efficiency class and one L3 size. settle gives the priorities to the registered threads only, so on such a processor the submitting thread kept its own "above normal", its helpers stayed at "normal", and the switch did nothing. The title's job workers run at "highest" there as everywhere.

  • ask registers the thread whether or not there are fast sets.
  • settle passes a null pointer with a count of 0 to SetThreadSelectedCpuSets when there are no sets to ask for, so no selection is made and the thread runs on any processor as before.
  • The log line says which of the two happened.

Nothing changes where fast sets exist (hybrid Intel, a Ryzen with one stacked-cache complex): the early return was the only thing the empty case touched.

Measured

Xeon E5-2680 v4 (14 cores, 28 threads, one class, one 35 MB L3), Radeon RX 7600 8 GB, 16 GB, Windows 10 22H2 with the Agility SDK 1.621, Series S profile, diag build of 925ac0a with this change, -Fast -Stream -SoftPages and the other switches of my preset for this PC.

One run standing in the first gameplay room of the prologue, with VICTORY_AB=12,VICTORY_LIST_PRIORITY,VICTORY_TITLE_FREE,VICTORY_LANE_PRIORITY (every combination by turns, 12 s each, 19 phases in the world):

VICTORY_LANE_PRIORITY Phases Median frame Mean draws a frame
on 8 66.6 ms 4,988
off 11 72.1 ms 4,785

The room's view changed what a frame cost during the run (1,400 to 6,800 draws), so read it as about 5 ms, not as 5.5. In the same run VICTORY_LIST_PRIORITY gave nothing (69.8 ms on, 68.7 off) and VICTORY_TITLE_FREE was a little worse (71.4 on, 67.4 off), as the comments in cores.rs already say of the 9950X3D.

Not tested

  • A hybrid or dual-complex processor: I have none. The code path there is the one that ran before.
  • VICTORY_LANE_CORE: untouched, and still off by default.

Checks

cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings reports the same errors with and without this change (bigalloc.rs:124, flashrec.rs:686, four in cores.rs from line 528 on, none in the lines changed here); main does not pass the workspace clippy on the pinned toolchain today.

🤖 Generated with Claude Code

**@⁠luannzin** on GitHub · 2026-12-02 01:29 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/9) `luannzin:lane-priority-equal-cores` → `main` · +13 −6 · 1 files · 1 commits · merged 2026-12-04 01:54 UTC ## What this changes `VICTORY_LANE_PRIORITY` now also works on a processor whose cores are all alike. Only `crates/victory-gpu/src/cores.rs` changes. `cores::ask` returned before it registered the calling thread when `fast_sets` came back empty, which it does on any processor with one efficiency class and one L3 size. `settle` gives the priorities to the registered threads only, so on such a processor the submitting thread kept its own "above normal", its helpers stayed at "normal", and the switch did nothing. The title's job workers run at "highest" there as everywhere. - `ask` registers the thread whether or not there are fast sets. - `settle` passes a null pointer with a count of 0 to `SetThreadSelectedCpuSets` when there are no sets to ask for, so no selection is made and the thread runs on any processor as before. - The log line says which of the two happened. Nothing changes where fast sets exist (hybrid Intel, a Ryzen with one stacked-cache complex): the early return was the only thing the empty case touched. ## Measured Xeon E5-2680 v4 (14 cores, 28 threads, one class, one 35 MB L3), Radeon RX 7600 8 GB, 16 GB, Windows 10 22H2 with the Agility SDK 1.621, Series S profile, diag build of 925ac0a with this change, `-Fast -Stream -SoftPages` and the other switches of [my preset for this PC](https://github.com/luannzin/revictory-rx7600). One run standing in the first gameplay room of the prologue, with `VICTORY_AB=12,VICTORY_LIST_PRIORITY,VICTORY_TITLE_FREE,VICTORY_LANE_PRIORITY` (every combination by turns, 12 s each, 19 phases in the world): | `VICTORY_LANE_PRIORITY` | Phases | Median frame | Mean draws a frame | |---|---|---|---| | on | 8 | 66.6 ms | 4,988 | | off | 11 | 72.1 ms | 4,785 | The room's view changed what a frame cost during the run (1,400 to 6,800 draws), so read it as about 5 ms, not as 5.5. In the same run `VICTORY_LIST_PRIORITY` gave nothing (69.8 ms on, 68.7 off) and `VICTORY_TITLE_FREE` was a little worse (71.4 on, 67.4 off), as the comments in `cores.rs` already say of the 9950X3D. ## Not tested - A hybrid or dual-complex processor: I have none. The code path there is the one that ran before. - `VICTORY_LANE_CORE`: untouched, and still off by default. ## Checks `cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings` reports the same errors with and without this change (`bigalloc.rs:124`, `flashrec.rs:686`, four in `cores.rs` from line 528 on, none in the lines changed here); `main` does not pass the workspace clippy on the pinned toolchain today. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`cores::ask` returned before registering the thread when no core is faster
than another, so `settle` never gave the submitting thread and its helpers
their priority there and VICTORY_LANE_PRIORITY did nothing. The thread is now
registered either way; with no fast sets no processors are asked for (a null
selection), only the priority is set.

Xeon E5-2680 v4, the switch swapped every 12 s in one run: 66.6 ms a frame
with it, 72.1 without.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 01:30:42 +00:00
github manually merged commit 7adf1b9f5b into main 2026-12-04 01:57:17 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.