Laptop (RTX 5060 8 GB, 8-core) findings: title watchdog quit, logging off the hot threads, ultraperformance in the launcher #1609

Manually merged
github merged 5 commits from github-bot/gh-1609 into main 2026-11-29 08:20:42 +00:00 AGit
Owner

@⁠icdmkg2 on GitHub · 2026-11-28 22:21 UTC · original
icdmkg2:perf/laptop-cpu-and-stalls → main · +309 −18 · 5 files · 5 commits · merged 2026-11-29 08:16 UTC

Measured on an RTX 5060 Laptop GPU (8 GB) with a Ryzen 7 H 260 (8 cores, 16 threads), 31 GB RAM, Windows 11. It's a CPU-limited laptop: the submitting thread takes about 40–45 ms a frame and the card is 36–68 % busy. Series S, DLSS performance, release build. Every figure comes from the layer's own 5-second lines, read over 60 s of play after a 30 s settle, with the same save, started and driven by a script. Run-to-run noise is about ±1.5 fps, so the smaller changes were run as alternating A/B pairs.

What's in it

1. The title's watchdog is told to quit: no more "crash" at +0x23cf683.
That crash is the title's own 30 s watchdog writing 0x4D8BD421 to address 0 (as found in #1428; #1221 has the same shape). On this laptop every run that ended there had first stood for 30 s with its frames stopped while loading into the world. The quit flag (bit 0 at +0x71b6340) is set at start, and only when the trap bytes are where they were found, so other title versions are left alone. VICTORY_TITLE_WATCHDOG=1 keeps the watchdog. Trade-off: a real deadlock now freezes the game instead of ending it.

2. Log lines are written by a thread of their own.
Each line used to be written to the console pipe on the thread that logged it, and play-foxhound.ps1 reads that pipe a line at a time. In one A/B pair: median frame time 52–57 ms with lines written in place, against 47–49 ms here, and frames over 50 ms per 5 s window 12–19 against 4–9. A full queue drops a line and says so. VICTORY_LOG_SYNC=1 writes in place, as before.

3. VICTORY_SUBMIT_CORE_ALONE=1 (opt-in): a physical core of its own for victory-submit on one-CCD CPUs.
#1093 only does this where a V-Cache half exists. This extends it to one-class SMT CPUs with 6 cores or more. It's off by default because here it was inside the noise (19.0 against 19.6 fps; 20.2–20.5 together with VICTORY_WAIT_SPIN=500).

4. guard()'s clean check a word at a time (Blocks::all instead of range().count() under the guards' lock), with a test against the old count over 40,000 random ranges. It gives the same answers; no gain was measurable on this machine.

5. play-foxhound.ps1 -Dlss ultraperformance.
Two A/B pairs on the 8 GB card: frames over 50 ms per 5 s window 3.8–3.9 against 6.8–7.0 with performance, and median fps 21.0 / 17.9 against 16.6 / 16.8. The picture is softer.

Found along the way, not in this PR

  • #1435: corrected. The 18.5 → 9.3 fps I first gave was a confounded first run of a fresh build (about 2,300 shaders translated during play). In a clean, warmed A/B on e1f2eb6, VICTORY_LDS_LAST_RESORT=1 doesn't change fps on this card, but it makes about 28% of the picture near-black (1.4% with it unset). Off by default is right. Details are in the #1435 thread.
  • VICTORY_LIBRARY_STATIC_SAMPLERS=1 looks safe now that samplers.rs primes a fixed order. Pipelines compiled per start fell from 1,089 to 333. It shortens loading, but gameplay fps didn't change.
  • The once-a-second sweep() runs on the submitting thread and takes 28–79 ms on an 8 GB card. Most of that is slot_evict walking every texture and slot. Resting it after empty passes cut that to 2–5 ms but made frames worse in A/B (VRAM filled up), so it's not included. Freeing spare upload chunks on another thread was in the same A/B and is left out too.
  • VICTORY_GUARD_HOT=100 and =500: 15.7 and 8.6 fps, worse. VICTORY_WAIT_RESIDENT=0 / =textures: no change.
  • Two "device removed" errors in about 30 runs on current main, both within a minute of entering the world. None in about 8 runs of the older build. Not investigated yet.

cargo clippy --no-deps -D warnings reports nothing in the changed files; the findings it does report are already on main (victory-shader lower.rs, victory-gpu host.rs / resource.rs / others). The new blocks_all_tests test and the existing cores tests pass.

🤖 Generated with Claude Code

**@⁠icdmkg2** on GitHub · 2026-11-28 22:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1609) `icdmkg2:perf/laptop-cpu-and-stalls` → `main` · +309 −18 · 5 files · 5 commits · merged 2026-11-29 08:16 UTC Measured on an **RTX 5060 Laptop GPU (8 GB) with a Ryzen 7 H 260 (8 cores, 16 threads), 31 GB RAM, Windows 11**. It's a CPU-limited laptop: the submitting thread takes about 40–45 ms a frame and the card is 36–68 % busy. Series S, DLSS performance, release build. Every figure comes from the layer's own 5-second lines, read over 60 s of play after a 30 s settle, with the same save, started and driven by a script. Run-to-run noise is about ±1.5 fps, so the smaller changes were run as alternating A/B pairs. ## What's in it **1. The title's watchdog is told to quit: no more "crash" at `+0x23cf683`.** That crash is the title's own 30 s watchdog writing `0x4D8BD421` to address 0 (as found in #1428; #1221 has the same shape). On this laptop every run that ended there had first stood for 30 s with its frames stopped while loading into the world. The quit flag (bit 0 at `+0x71b6340`) is set at start, and only when the trap bytes are where they were found, so other title versions are left alone. `VICTORY_TITLE_WATCHDOG=1` keeps the watchdog. Trade-off: a real deadlock now freezes the game instead of ending it. **2. Log lines are written by a thread of their own.** Each line used to be written to the console pipe on the thread that logged it, and `play-foxhound.ps1` reads that pipe a line at a time. In one A/B pair: median frame time 52–57 ms with lines written in place, against 47–49 ms here, and frames over 50 ms per 5 s window 12–19 against 4–9. A full queue drops a line and says so. `VICTORY_LOG_SYNC=1` writes in place, as before. **3. `VICTORY_SUBMIT_CORE_ALONE=1` (opt-in): a physical core of its own for `victory-submit` on one-CCD CPUs.** #1093 only does this where a V-Cache half exists. This extends it to one-class SMT CPUs with 6 cores or more. It's off by default because here it was inside the noise (19.0 against 19.6 fps; 20.2–20.5 together with `VICTORY_WAIT_SPIN=500`). **4. `guard()`'s clean check a word at a time** (`Blocks::all` instead of `range().count()` under the guards' lock), with a test against the old count over 40,000 random ranges. It gives the same answers; no gain was measurable on this machine. **5. `play-foxhound.ps1 -Dlss ultraperformance`.** Two A/B pairs on the 8 GB card: frames over 50 ms per 5 s window 3.8–3.9 against 6.8–7.0 with `performance`, and median fps 21.0 / 17.9 against 16.6 / 16.8. The picture is softer. ## Found along the way, not in this PR - **#1435: corrected.** The 18.5 → 9.3 fps I first gave was a confounded first run of a fresh build (about 2,300 shaders translated during play). In a clean, warmed A/B on `e1f2eb6`, `VICTORY_LDS_LAST_RESORT=1` doesn't change fps on this card, but it makes about 28% of the picture near-black (1.4% with it unset). Off by default is right. Details are in the #1435 thread. - **`VICTORY_LIBRARY_STATIC_SAMPLERS=1` looks safe now that `samplers.rs` primes a fixed order.** Pipelines compiled per start fell from 1,089 to 333. It shortens loading, but gameplay fps didn't change. - **The once-a-second `sweep()` runs on the submitting thread and takes 28–79 ms on an 8 GB card.** Most of that is `slot_evict` walking every texture and slot. Resting it after empty passes cut that to 2–5 ms but made frames worse in A/B (VRAM filled up), so it's not included. Freeing spare upload chunks on another thread was in the same A/B and is left out too. - **`VICTORY_GUARD_HOT=100` and `=500`:** 15.7 and 8.6 fps, worse. `VICTORY_WAIT_RESIDENT=0` / `=textures`: no change. - **Two "device removed" errors in about 30 runs on current `main`**, both within a minute of entering the world. None in about 8 runs of the older build. Not investigated yet. `cargo clippy --no-deps -D warnings` reports nothing in the changed files; the findings it does report are already on `main` (victory-shader `lower.rs`, victory-gpu `host.rs` / `resource.rs` / others). The new `blocks_all_tests` test and the existing `cores` tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The crash at victory-image+0x23cf683 (write 0x0) is the title's own watchdog:
it writes 0x4D8BD421 to address 0 when its heartbeat stops for 30 one-second
ticks (found in #1428; #1221 shows the same shape). On an RTX 5060 Laptop
every such end was preceded by 30 s of stopped frames while loading into the
world. The watchdog's quit flag (bit 0 at +0x71b6340) is set at start, only
when the trap bytes are where they were found, so other title versions are
left alone. VICTORY_TITLE_WATCHDOG=1 keeps the watchdog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every line was written to the console pipe and the log file on the thread
that logged it. A launcher that reads the pipe a line at a time
(play-foxhound.ps1) held the submitting and title threads in a log call when
it fell behind. One A/B pair on an RTX 5060 Laptop (Series S, DLSS
performance): median frame time 52-57 ms with lines written in place against
47-49 ms here, frames over 50 ms per 5 s window 12-19 against 4-9. A full
queue drops a line and says so; VICTORY_LOG_SYNC=1 writes in place as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
#1093 carves a physical core for the submitting thread only where a V-Cache
half exists; elsewhere the process is not placed. VICTORY_SUBMIT_CORE_ALONE=1
does the same on a processor of one core class with SMT and six cores or
more. Off by default: on a Ryzen 7 H 260 it was inside the run-to-run noise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
guard() counted range(first..last).count() == last - first block by block
under the guards' lock. Blocks::all answers the same with masks over words; a
test checks it against the count over 40,000 random ranges.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The layer and victory play already take it (Series S 640x360, #1115). Two A/B
pairs on an 8 GB RTX 5060 Laptop, Series S: frames over 50 ms per 5 s window
3.8-3.9 against 6.8-7.0 with performance, median fps 21.0/17.9 against
16.6/16.8; a softer picture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 22:24:34 +00:00
github manually merged commit a06751bf38 into main 2026-11-29 08:20:42 +00:00
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!1609
No description provided.