Skip to content

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

Open
icdmkg2 wants to merge 5 commits into
trustno1-coder:mainfrom
icdmkg2:perf/laptop-cpu-and-stalls
Open

icdmkg2 wants to merge 5 commits into
trustno1-coder:mainfrom
icdmkg2:perf/laptop-cpu-and-stalls

Conversation

@icdmkg2

@icdmkg2 icdmkg2 commented Nov 28, 2026

Copy link
Copy Markdown

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

  • #43 (static Wave32 LDS alias): 8 compute shaders no longer translate on 32-lane hosts ("no wave32 lowering for this wave64 program") #1435 is real on NVIDIA. On current main the same run went from about 18.5 to 9.3 fps, with the submitting thread at 86 ms a frame. Reverting shader: static Wave32 LDS alias and lane-private hazard analysis #43 locally brought it back.
  • 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 and others added 5 commits November 29, 2026 00:16
… at +0x23cf683

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 trustno1-coder#1428; trustno1-coder#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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
trustno1-coder#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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
The layer and victory play already take it (Series S 640x360, trustno1-coder#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 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant