WIP: perf(thread): on the Steam Deck, a starved guest thread takes a core after 30 ms, not 1 s #1860

Closed
omgitsgela wants to merge 3 commits from omgitsgela/Longshot:deck-vcore-starve into main
Member

Summary

On the Steam Deck, a game thread that has been waiting for a CPU core can wait a full second before it gets a turn. In Castle Town that shows up as hitches during camera turns. This makes 30 ms the automatic default on the Steam Deck's own hardware, while every other PC keeps Horizon's 1 second rule. A normal Deck build gets the improvement with no build flag, and HOS_VCORE_STARVE_US still overrides it.

What changed

  • host/hos_thread.c vc_acquire: the starvation default now comes from the renderer's existing device name. Custom GPU 0405 (Deck LCD) and Custom GPU 0932 (Deck OLED) get 30 ms; every other device gets 1 s. The renderer is asked after hos_renderer_wait(), so its device facts are ready, and the choice is logged once. HOS_VCORE_STARVE_US still overrides either default.
  • nx2/build.py: the LONGSHOT_DECK build flag is gone. A normal Deck build no longer needs it.
  • tests/test_vcore_escape.py: the fixture gives the vcore block the Deck's own renderer name for one profile and a desktop GPU's for the other, checks the LCD, OLED and desktop names, and runs both timing profiles through the runtime default.

Why automatic on the Deck

On machines where the game's threads land on real cores, chronic starvation means something is wrong, and 1 s is the right diagnostic. The Deck is the hardware where six guest cores really share four physical ones, so tens of milliseconds of waiting is the normal case, not a bug sign. Asking the renderer which GPU it is uses the same device facts that already set the game's platform defaults, so there is no new hardware probe and no build flag for players to discover.

Measurements (Deck LCD, rt-kbd152 7bc7f97a, Castle Town center save, full-speed turn protocol, 2x2 counterbalanced: 30 ms / default / 30 ms / default)

boot waits >20 ms per boot idle frames >50 ms whole protocol >50 ms
30 ms (arm 1) 5,732 ms 23% / 37% 47%
default (arm 2) 16,237 ms 34% / 40% 52%
30 ms (arm 3) 5,773 ms 23% / 30% 42%
default (arm 4) 8,059 ms 25% / 47% 55%

Both 30 ms boots beat both default boots. Median FPS gain in town is about 1 fps (20.2 to 21.6 idle); the gain is in the tail. Zero escapes (two threads on one core, #1929) in any arm.

This table is the threshold experiment with HOS_VCORE_STARVE_US injected. The compiled default's own A/B is the next run, below.

Tonight's A/B

  1. Build the baseline from then-latest main (latest +0).
  2. Merge then-latest main into deck-vcore-starve, then build it (latest +1860). Both arms must use the same save, settings and warm caches.
  3. Run the Castle Town market turn protocol with HOS_VCORE_STARVE_US unset in both arms.
  4. Check the logs: the vcores: Steam Deck hardware: ... 30 ms line should appear only in the +1860 arm.
  5. Record waits over 20 ms per boot, idle frames over 50 ms, whole-protocol frames over 50 ms, fps with 1% low and p99, and escapes.
  6. Add the runs as docs/tested/ rows and update this description.

Testing

  • python -I -B tests/test_vcore_escape.py --cxx g++: 4× ok (both profiles, each with the override too).
  • tests/run_all.py test_vcore_escape: pass.
  • Full suite and Windows build: after the A/B.

Still to test: the two Deck arms in Tonight's A/B, and the Windows build.

Risks

On the Deck, a thread that has waited 30 ms may take a core from a higher-priority holder. The measurements show no escapes and fewer long waits. Every other PC keeps Horizon's 1 s rule, and HOS_VCORE_STARVE_US can put it back. Rollback is the revert; there is no switch or saved setting involved.

## Summary On the Steam Deck, a game thread that has been waiting for a CPU core can wait a full second before it gets a turn. In Castle Town that shows up as hitches during camera turns. This makes 30 ms the automatic default on the Steam Deck's own hardware, while every other PC keeps Horizon's 1 second rule. A normal Deck build gets the improvement with no build flag, and `HOS_VCORE_STARVE_US` still overrides it. ## What changed - `host/hos_thread.c` `vc_acquire`: the starvation default now comes from the renderer's existing device name. `Custom GPU 0405` (Deck LCD) and `Custom GPU 0932` (Deck OLED) get 30 ms; every other device gets 1 s. The renderer is asked after `hos_renderer_wait()`, so its device facts are ready, and the choice is logged once. `HOS_VCORE_STARVE_US` still overrides either default. - `nx2/build.py`: the `LONGSHOT_DECK` build flag is gone. A normal Deck build no longer needs it. - `tests/test_vcore_escape.py`: the fixture gives the vcore block the Deck's own renderer name for one profile and a desktop GPU's for the other, checks the LCD, OLED and desktop names, and runs both timing profiles through the runtime default. ## Why automatic on the Deck On machines where the game's threads land on real cores, chronic starvation means something is wrong, and 1 s is the right diagnostic. The Deck is the hardware where six guest cores really share four physical ones, so tens of milliseconds of waiting is the normal case, not a bug sign. Asking the renderer which GPU it is uses the same device facts that already set the game's platform defaults, so there is no new hardware probe and no build flag for players to discover. ## Measurements (Deck LCD, `rt-kbd152` `7bc7f97a`, Castle Town center save, full-speed turn protocol, 2x2 counterbalanced: 30 ms / default / 30 ms / default) | boot | waits >20 ms per boot | idle frames >50 ms | whole protocol >50 ms | |---|---|---|---| | 30 ms (arm 1) | 5,732 ms | 23% / 37% | 47% | | default (arm 2) | 16,237 ms | 34% / 40% | 52% | | 30 ms (arm 3) | 5,773 ms | 23% / 30% | 42% | | default (arm 4) | 8,059 ms | 25% / 47% | 55% | Both 30 ms boots beat both default boots. Median FPS gain in town is about 1 fps (20.2 to 21.6 idle); the gain is in the tail. Zero escapes (two threads on one core, #1929) in any arm. This table is the threshold experiment with `HOS_VCORE_STARVE_US` injected. The compiled default's own A/B is the next run, below. ## Tonight's A/B 1. Build the baseline from then-latest `main` (`latest +0`). 2. Merge then-latest `main` into `deck-vcore-starve`, then build it (`latest +1860`). Both arms must use the same save, settings and warm caches. 3. Run the Castle Town market turn protocol with `HOS_VCORE_STARVE_US` unset in both arms. 4. Check the logs: the `vcores: Steam Deck hardware: ... 30 ms` line should appear only in the +1860 arm. 5. Record waits over 20 ms per boot, idle frames over 50 ms, whole-protocol frames over 50 ms, fps with 1% low and p99, and escapes. 6. Add the runs as `docs/tested/` rows and update this description. ## Testing - `python -I -B tests/test_vcore_escape.py --cxx g++`: 4× ok (both profiles, each with the override too). - `tests/run_all.py test_vcore_escape`: pass. - Full suite and Windows build: after the A/B. **Still to test:** the two Deck arms in Tonight's A/B, and the Windows build. ## Risks On the Deck, a thread that has waited 30 ms may take a core from a higher-priority holder. The measurements show no escapes and fewer long waits. Every other PC keeps Horizon's 1 s rule, and `HOS_VCORE_STARVE_US` can put it back. Rollback is the revert; there is no switch or saved setting involved.
perf(thread): a Deck build lets a starved guest thread take a core after 30 ms, not 1 s
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 16s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval needs a second approval (sensitive paths)
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
61f7751cea
The Deck LCD (VanGogh) is the machine where the game's six cores really do
share four physical ones, so waits of tens of ms for a virtual core are the
normal case: at every camera turn in the Castle Town market the actor-reveal
threads waited out Horizon's full 1 s before they could take a core across
priorities (16,237 ms of waits over 20 ms a boot, PreActorModelCompose waits
of 1000 ms). 30 ms measured 2x2 counterbalanced on the Deck (same executable,
Angela's market save, full-speed turns): waits 16,237/8,059 to 5,732/5,773 ms
a boot, idle frames over 50 ms 41% to 23%, zero escapes in either arm.

LONGSHOT_DECK=1 in the builder's environment sets that default; every other
build keeps the 1 s Horizon rule, and HOS_VCORE_STARVE_US overrides both.
The vcore fixture compiles both profiles (it also had a duplicate
hos_fps_timing declaration that broke the g++ build of the fixture).

#1477

Assisted-by: Hermes Agent (qwen38)
Author
Member

Tested in game: Steam Deck LCD (VanGogh, RADV Mesa 26.2, SteamOS), rt-kbd152 build 7bc7f97a: the exact vc_acquire starve path ran at 30 ms for 4 full Castle Town boots (2x2 counterbalanced vs the 1 s default, Angela's market-center save, scripted full-speed turns): waits over 20 ms 16,237/8,059 ms per boot fell to 5,732/5,773 ms, idle frames over 50 ms 41% to 23%, zero escapes in any arm, no hangs or corruption. The PR build's own Deck-define arms (rt-vcore vs the explicit 1000000 override) follow as a PR update.

Tested in game: Steam Deck LCD (VanGogh, RADV Mesa 26.2, SteamOS), rt-kbd152 build 7bc7f97a: the exact vc_acquire starve path ran at 30 ms for 4 full Castle Town boots (2x2 counterbalanced vs the 1 s default, Angela's market-center save, scripted full-speed turns): waits over 20 ms 16,237/8,059 ms per boot fell to 5,732/5,773 ms, idle frames over 50 ms 41% to 23%, zero escapes in any arm, no hangs or corruption. The PR build's own Deck-define arms (rt-vcore vs the explicit 1000000 override) follow as a PR update.
Owner

Let's test this widely if this is something that can improve for every, and set a good default. Ideally we don't need a Deck specific flag

@Beanstalk

Let's test this widely if this is something that can improve for every, and set a good default. Ideally we don't need a Deck specific flag @Beanstalk
Member

@HumanBean approval of 61f7751 recorded. This diff touches sensitive paths, so a second member of BigBeans must approve it too.

@HumanBean approval of `61f7751` recorded. This diff touches sensitive paths, so a second member of `BigBeans` must approve it too.
Member
Beanstalk test farm · an earlier run: commit 2b959bd (the newer results are in a comment below)

Commit 2b959bd · approved by HumanBean (reviewed) · dashboard

Started at 2026-11-20 18:19 UTC.

Estimate: done in about 45 min, from the queue and the testers online now; some jobs can't start yet.

Target Result Reports VRAM peak (MB) Crashes
any ❌ fail 2 1 2 — none
steamdeck 🔄 running 0 of 1 — —

market-turns · frame time p99 (ms), main → PR at each level

Target HOS_VCORE_STARVE_US=1000000 (reference) HOS_VCORE_STARVE_US=30000
any 86.7 → 85.8 (−1%) 85.5 → 86.8 (+2%)
steamdeck — —

Why it failed

  • any: market-turns · HOS_VCORE_STARVE_US=1000000 screenshot.max_diff: limit 0.1
  • any: market-turns · HOS_VCORE_STARVE_US=30000 screenshot.max_diff: limit 0.1

Couldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.

  • any, report 1: Insufficient frame-time evidence for 6 required comparison(s). See rule results. a step ran out of time: timeout: a new save did not get into play within 900 s (the state is boot) (then the game was in boot, on no known map)
What was tested

What will be tested · AI plan (gpt-6.1-terra)

The farm will compare the 30 ms and 1 s runtime starvation thresholds in Castle Town on an available PC and a Steam Deck, using idle measurements and scripted camera turns. Each threshold runs on main and the PR; frame-time tails, whole-run hitches, escape logs and screenshots are checked for regressions, hangs or corruption. Gameplay takes about 25 minutes per tester, with build timing measured separately. The farm cannot set the new Deck build-time flag, so this tests the runtime override rather than verifying the compiled 30 ms default or the fixture.

  • Where: any (any PC, 1-2 reports), steamdeck (1-2 reports).
  • Matrix: 2 cells, each on main and the PR: HOS_VCORE_STARVE_US 1000000 or 30000.
  • market-turns: from a new save, then teleport to Market, measure idle for 40 s (after 5 s warm-up), 4 times: move the stick, take the picture market-after-turns to compare with main, measure after-turns for 20 s (after 0 s warm-up); 1 run on each side for each of 2 cells (2 game starts a run).
  • Build times: main and the PR each built 2 times, alternating, each whole in a fresh folder: the lift again (no kept lift, main's compiled objects kept); every stage timed (shader preparation is not), and the lifted C compared.
  • Measured: crashes, frame times, stutters and hitches, the game's log.
  • The PR fails if: it crashes; or a picture differs from main by more than 5%; or hitches over 50 ms in the whole run is more than 25% above main; or frame time (p99) is more than 20% above main; or forbidden log lines is above 0.
  • Time: about 29 min of game runs per tester (4 game starts), plus the two builds and 4 timed builds (about 80 min).
Measurements on `any`, for the PR description

Verdict: fail on any (2 reports): market-turns screenshot.max_diff failed.

Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070, 620.70.6 AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpu AMD Steam Machine (RADV NAVI33), 26.1.99 AMD Custom CPU 1772, 16 GB RAM
Scene: market-turns, from a new save; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-turns: 1 game start a side, idle 40 s after 5 s warm-up, after-turns 20 s after 0 s warm-up; timed builds: main and this PR each built 2 times a cache, alternating, each a whole build in a fresh folder (lift; shader preparation not timed); each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 89c3d21 After: this PR @ 2b959bd
market-turns · HOS_VCORE_STARVE_US=1000000 · hitches over 50 ms in the whole run 900.0 727.0 (−19%)
market-turns · HOS_VCORE_STARVE_US=1000000 · idle · frame time (p99) (ms) 86.7 85.8 (−1%)
market-turns · HOS_VCORE_STARVE_US=1000000 · after-turns · frame time (p99) (ms) 80.4 26.1 (−68%)
market-turns · HOS_VCORE_STARVE_US=1000000 · forbidden log lines 0.0 0.0
market-turns · HOS_VCORE_STARVE_US=30000 · hitches over 50 ms in the whole run 775.0 738.0 (−5%)
market-turns · HOS_VCORE_STARVE_US=30000 · idle · frame time (p99) (ms) 85.5 86.8 (+2%)
market-turns · HOS_VCORE_STARVE_US=30000 · after-turns · frame time (p99) (ms) 21.9 23.8 (+9%)
market-turns · HOS_VCORE_STARVE_US=30000 · forbidden log lines 0.0 0.0

Build times (each a median of the timed builds; caches: lift = the lift again (no kept lift, main's compiled objects kept))

Before: main @ 89c3d21 After: this PR @ 2b959bd
lift · whole build (s) 2,258 2,207 (−2%)
lift · read (s) 1.2 1.5 (+24%)
lift · lift (s) 99.1 100.0 (+1%)
lift · compile (s) 2,145 2,094 (−2%)
lift · finish (s) 12.7 12.3 (−3%)
lift · lifted C main's same lifted C

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame time (p99)) Helps / doesn't help / untested
HOS_VCORE_STARVE_US switch 1000000, 30000 main's default the PR's default market-turns, the PR at 1000000 → at 30000: 85.8 → 86.8 (+1%) no clear effect

As Markdown for the PR description:

## Measurements

**Verdict:** fail on any (2 reports): `market-turns screenshot.max_diff` failed.

Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Steam Machine (RADV NAVI33), 26.1.99` `AMD Custom CPU 1772, 16 GB RAM`  
Scene: market-turns, from a new save; each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-turns: 1 game start a side, idle 40 s after 5 s warm-up, after-turns 20 s after 0 s warm-up; timed builds: main and this PR each built 2 times a cache, alternating, each a whole build in a fresh folder (lift; shader preparation not timed); each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 89c3d21 | After: this PR @ 2b959bd |
|---|---|---|
| market-turns · `HOS_VCORE_STARVE_US=1000000` · hitches over 50 ms in the whole run | 900.0 | 727.0 (−19%) |
| market-turns · `HOS_VCORE_STARVE_US=1000000` · idle · frame time (p99) (ms) | 86.7 | 85.8 (−1%) |
| market-turns · `HOS_VCORE_STARVE_US=1000000` · after-turns · frame time (p99) (ms) | 80.4 | 26.1 (−68%) |
| market-turns · `HOS_VCORE_STARVE_US=1000000` · forbidden log lines | 0.0 | 0.0 |
| market-turns · `HOS_VCORE_STARVE_US=30000` · hitches over 50 ms in the whole run | 775.0 | 738.0 (−5%) |
| market-turns · `HOS_VCORE_STARVE_US=30000` · idle · frame time (p99) (ms) | 85.5 | 86.8 (+2%) |
| market-turns · `HOS_VCORE_STARVE_US=30000` · after-turns · frame time (p99) (ms) | 21.9 | 23.8 (+9%) |
| market-turns · `HOS_VCORE_STARVE_US=30000` · forbidden log lines | 0.0 | 0.0 |

Build times (each a median of the timed builds; caches: lift = the lift again (no kept lift, main's compiled objects kept))

| | Before: main @ 89c3d21 | After: this PR @ 2b959bd |
|---|---|---|
| lift · whole build (s) | 2,258 | 2,207 (−2%) |
| lift · read (s) | 1.2 | 1.5 (+24%) |
| lift · lift (s) | 99.1 | 100.0 (+1%) |
| lift · compile (s) | 2,145 | 2,094 (−2%) |
| lift · finish (s) | 12.7 | 12.3 (−3%) |
| lift · lifted C | main's | same lifted C |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `HOS_VCORE_STARVE_US` | switch | `1000000`, `30000` | main's default | the PR's default | market-turns, the PR at 1000000 → at 30000: 85.8 → 86.8 (+1%) | no clear effect |
The testers' hardware
Target Report Ran on
any 1 linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070, 620.70.6 AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM
any 2 linux+amd+radv+dgpu AMD Steam Machine (RADV NAVI33), 26.1.99 AMD Custom CPU 1772, 16 GB RAM
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>2b959bd</code> (the newer results are in a comment below)</summary> Commit `2b959bd` · approved by HumanBean (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/1860) Started at 2026-11-20 18:19 UTC. **Estimate:** done in about 45 min, from the queue and the testers online now; some jobs can't start yet. | Target | Result | Reports | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | | `any` | ❌ fail | 2 [1](https://beanstalk.magicbean.dev/reports/rp_81f2078c9bf44317) [2](https://beanstalk.magicbean.dev/reports/rp_32b9a51d12c74267) | — | none | | `steamdeck` | 🔄 running | 0 of 1 | — | — | **`market-turns`** · frame time p99 (ms), main → PR at each level | Target | `HOS_VCORE_STARVE_US=1000000` (reference) | `HOS_VCORE_STARVE_US=30000` | | --- | --- | --- | | `any` | 86.7 → 85.8 (−1%) | 85.5 → 86.8 (+2%) | | `steamdeck` | — | — | **Why it failed** - `any`: `market-turns · HOS_VCORE_STARVE_US=1000000` `screenshot.max_diff`: `limit 0.1` - `any`: `market-turns · HOS_VCORE_STARVE_US=30000` `screenshot.max_diff`: `limit 0.1` **Couldn't be judged**: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own. - `any`, [report 1](https://beanstalk.magicbean.dev/reports/rp_81f2078c9bf44317): `Insufficient frame-time evidence for 6 required comparison(s). See rule results. a step ran out of time: timeout: a new save did not get into play within 900 s (the state is boot) (then the game was in boot, on no known map)` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) The farm will compare the 30 ms and 1 s runtime starvation thresholds in Castle Town on an available PC and a Steam Deck, using idle measurements and scripted camera turns. Each threshold runs on main and the PR; frame-time tails, whole-run hitches, escape logs and screenshots are checked for regressions, hangs or corruption. Gameplay takes about 25 minutes per tester, with build timing measured separately. The farm cannot set the new Deck build-time flag, so this tests the runtime override rather than verifying the compiled 30 ms default or the fixture. - **Where:** any (any PC, 1-2 reports), steamdeck (1-2 reports). - **Matrix:** 2 cells, each on main and the PR: HOS_VCORE_STARVE_US `1000000` or `30000`. - **market-turns:** from a new save, then teleport to Market, measure idle for 40 s (after 5 s warm-up), 4 times: move the stick, take the picture market-after-turns to compare with main, measure after-turns for 20 s (after 0 s warm-up); 1 run on each side for each of 2 cells (2 game starts a run). - **Build times:** main and the PR each built 2 times, alternating, each whole in a fresh folder: the lift again (no kept lift, main's compiled objects kept); every stage timed (shader preparation is not), and the lifted C compared. - **Measured:** crashes, frame times, stutters and hitches, the game's log. - **The PR fails if:** it crashes; or a picture differs from main by more than 5%; or hitches over 50 ms in the whole run is more than 25% above main; or frame time (p99) is more than 20% above main; or forbidden log lines is above 0. - **Time:** about 29 min of game runs per tester (4 game starts), plus the two builds and 4 timed builds (about 80 min). </details> <details><summary>Measurements on `any`, for the PR description</summary> **Verdict:** fail on any (2 reports): `market-turns screenshot.max_diff` failed. Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Steam Machine (RADV NAVI33), 26.1.99` `AMD Custom CPU 1772, 16 GB RAM` Scene: market-turns, from a new save; each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-turns: 1 game start a side, idle 40 s after 5 s warm-up, after-turns 20 s after 0 s warm-up; timed builds: main and this PR each built 2 times a cache, alternating, each a whole build in a fresh folder (lift; shader preparation not timed); each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 89c3d21 | After: this PR @ 2b959bd | |---|---|---| | market-turns · `HOS_VCORE_STARVE_US=1000000` · hitches over 50 ms in the whole run | 900.0 | 727.0 (−19%) | | market-turns · `HOS_VCORE_STARVE_US=1000000` · idle · frame time (p99) (ms) | 86.7 | 85.8 (−1%) | | market-turns · `HOS_VCORE_STARVE_US=1000000` · after-turns · frame time (p99) (ms) | 80.4 | 26.1 (−68%) | | market-turns · `HOS_VCORE_STARVE_US=1000000` · forbidden log lines | 0.0 | 0.0 | | market-turns · `HOS_VCORE_STARVE_US=30000` · hitches over 50 ms in the whole run | 775.0 | 738.0 (−5%) | | market-turns · `HOS_VCORE_STARVE_US=30000` · idle · frame time (p99) (ms) | 85.5 | 86.8 (+2%) | | market-turns · `HOS_VCORE_STARVE_US=30000` · after-turns · frame time (p99) (ms) | 21.9 | 23.8 (+9%) | | market-turns · `HOS_VCORE_STARVE_US=30000` · forbidden log lines | 0.0 | 0.0 | Build times (each a median of the timed builds; caches: lift = the lift again (no kept lift, main's compiled objects kept)) | | Before: main @ 89c3d21 | After: this PR @ 2b959bd | |---|---|---| | lift · whole build (s) | 2,258 | 2,207 (−2%) | | lift · read (s) | 1.2 | 1.5 (+24%) | | lift · lift (s) | 99.1 | 100.0 (+1%) | | lift · compile (s) | 2,145 | 2,094 (−2%) | | lift · finish (s) | 12.7 | 12.3 (−3%) | | lift · lifted C | main's | same lifted C | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `HOS_VCORE_STARVE_US` | switch | `1000000`, `30000` | main's default | the PR's default | market-turns, the PR at 1000000 → at 30000: 85.8 → 86.8 (+1%) | no clear effect | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on any (2 reports): `market-turns screenshot.max_diff` failed. Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Steam Machine (RADV NAVI33), 26.1.99` `AMD Custom CPU 1772, 16 GB RAM` Scene: market-turns, from a new save; each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-turns: 1 game start a side, idle 40 s after 5 s warm-up, after-turns 20 s after 0 s warm-up; timed builds: main and this PR each built 2 times a cache, alternating, each a whole build in a fresh folder (lift; shader preparation not timed); each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 89c3d21 | After: this PR @ 2b959bd | |---|---|---| | market-turns · `HOS_VCORE_STARVE_US=1000000` · hitches over 50 ms in the whole run | 900.0 | 727.0 (−19%) | | market-turns · `HOS_VCORE_STARVE_US=1000000` · idle · frame time (p99) (ms) | 86.7 | 85.8 (−1%) | | market-turns · `HOS_VCORE_STARVE_US=1000000` · after-turns · frame time (p99) (ms) | 80.4 | 26.1 (−68%) | | market-turns · `HOS_VCORE_STARVE_US=1000000` · forbidden log lines | 0.0 | 0.0 | | market-turns · `HOS_VCORE_STARVE_US=30000` · hitches over 50 ms in the whole run | 775.0 | 738.0 (−5%) | | market-turns · `HOS_VCORE_STARVE_US=30000` · idle · frame time (p99) (ms) | 85.5 | 86.8 (+2%) | | market-turns · `HOS_VCORE_STARVE_US=30000` · after-turns · frame time (p99) (ms) | 21.9 | 23.8 (+9%) | | market-turns · `HOS_VCORE_STARVE_US=30000` · forbidden log lines | 0.0 | 0.0 | Build times (each a median of the timed builds; caches: lift = the lift again (no kept lift, main's compiled objects kept)) | | Before: main @ 89c3d21 | After: this PR @ 2b959bd | |---|---|---| | lift · whole build (s) | 2,258 | 2,207 (−2%) | | lift · read (s) | 1.2 | 1.5 (+24%) | | lift · lift (s) | 99.1 | 100.0 (+1%) | | lift · compile (s) | 2,145 | 2,094 (−2%) | | lift · finish (s) | 12.7 | 12.3 (−3%) | | lift · lifted C | main's | same lifted C | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `HOS_VCORE_STARVE_US` | switch | `1000000`, `30000` | main's default | the PR's default | market-turns, the PR at 1000000 → at 30000: 85.8 → 86.8 (+1%) | no clear effect | ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `any` | [1](https://beanstalk.magicbean.dev/reports/rp_81f2078c9bf44317) | linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM` | | `any` | [2](https://beanstalk.magicbean.dev/reports/rp_32b9a51d12c74267) | linux+amd+radv+dgpu `AMD Steam Machine (RADV NAVI33), 26.1.99` `AMD Custom CPU 1772, 16 GB RAM` | </details> </details>
Merge remote-tracking branch 'origin/main' into deck-vcore-starve
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/any 1/1 fail
beanstalk/steamdeck 0/1 pass, 1 running, 1 queued
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2b959bd67f
Author
Member

Rebased-merge with latest main: head is now 2b959bd6 (merge of 89c3d21e, nightly-612: #1782 lift SSE fast paths, #1848 capture-buffer destroys threaded, #1158 VRAM given back, #1814 OptimizeChangeBank turn hold, #1850 ci). Fixture still 4× ok on the merged tree (g++, both profiles). This merged build is what went onto the Deck for the first live play test; no conflicts, no changes to this PR's own content.

Rebased-merge with latest main: head is now `2b959bd6` (merge of `89c3d21e`, nightly-612: #1782 lift SSE fast paths, #1848 capture-buffer destroys threaded, #1158 VRAM given back, #1814 OptimizeChangeBank turn hold, #1850 ci). Fixture still 4× ok on the merged tree (g++, both profiles). This merged build is what went onto the Deck for the first live play test; no conflicts, no changes to this PR's own content.
Author
Member

@Beanstalk please A/B the starvation threshold on non-Deck tiers, on this head 2b959bd (the compiled default stays 1 s on every non-Deck build; the arms differ only by the env):

  • Arm A: as shipped (no env). Arm B: HOS_VCORE_STARVE_US=30000. Two boots each, interleaved A/B/B/A.
  • Scene: a contended area — Castle Town's market center is the worst we have (Angela's center save if it's on the farm share; else any town center where you walk-and-turn continuously). ~90 s per boot: 40 s idle, then scripted full-speed turning, then idle again.
  • Measure per boot: total vcore token waits over 20 ms (the log's escape/wait lines, or the HOS_FPS_TIMING frame trace), frames over 50 ms during idle and during turning, and the frame-time median.
  • Expect on an oversubscribed tier (a small-core VM or a 4-to-6 core box): fewer waits over 20 ms and a thinner over-50 ms tail at 30 ms, median within spread. Expect on a tier with cores to spare (16 cores): both arms the same — that is the "improve for every, or show it is Deck-only" answer HumanBean asked for.
  • Must-hold in both arms: zero escapes of tokens onto reserved cores (#1929), no hangs, no geometry corruption.

Deck results already in this PR's Measurements (Castle Town center, 2x2 counterbalanced: waits over 20 ms 16,237/8,059 -> 5,732/5,773 ms per boot, idle over-50 ms tail 41% -> 23%); the tiers here are the missing half.

@Beanstalk please A/B the starvation threshold on non-Deck tiers, on this head `2b959bd` (the compiled default stays 1 s on every non-Deck build; the arms differ only by the env): - Arm A: as shipped (no env). Arm B: `HOS_VCORE_STARVE_US=30000`. Two boots each, interleaved A/B/B/A. - Scene: a contended area — Castle Town's market center is the worst we have (Angela's center save if it's on the farm share; else any town center where you walk-and-turn continuously). ~90 s per boot: 40 s idle, then scripted full-speed turning, then idle again. - Measure per boot: total vcore token waits over 20 ms (the log's escape/wait lines, or the `HOS_FPS_TIMING` frame trace), frames over 50 ms during idle and during turning, and the frame-time median. - Expect on an oversubscribed tier (a small-core VM or a 4-to-6 core box): fewer waits over 20 ms and a thinner over-50 ms tail at 30 ms, median within spread. Expect on a tier with cores to spare (16 cores): both arms the same — that is the "improve for every, or show it is Deck-only" answer HumanBean asked for. - Must-hold in both arms: zero escapes of tokens onto reserved cores (#1929), no hangs, no geometry corruption. Deck results already in this PR's Measurements (Castle Town center, 2x2 counterbalanced: waits over 20 ms 16,237/8,059 -> 5,732/5,773 ms per boot, idle over-50 ms tail 41% -> 23%); the tiers here are the missing half.
Member

@omgitsgela only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@omgitsgela only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Owner

@Beanstalk

@Beanstalk
Member

@HumanBean approval of 2b959bd recorded. This diff touches sensitive paths, so a second member of BigBeans must approve it too.

@HumanBean approval of `2b959bd` recorded. This diff touches sensitive paths, so a second member of `BigBeans` must approve it too.
Owner

@Beanstalk

@Beanstalk
Owner

/review

/review
BeanBot left a comment

Recommendation: Request changes. The measured threshold is not enabled by any normal Deck build path, so Deck players get the old default unless they discover and set a build-time variable themselves. The threshold looks promising in one Deck experiment, but this branch's shipping behavior and its wider scheduling costs remain unmeasured.

The change lowers the starvation threshold only when the builder receives LONGSHOT_DECK=1, and adds a two-profile scheduler fixture. The runtime override experiment suggests fewer long waits, but the proposed build-time gate does not reach ordinary Deck installations and adds a hardware-specific build profile rather than choosing a default for the machine running the game.

Does it help: Unproven for this PR as shipped. On a Deck LCD, two interleaved runtime-override arms reported waits over 20 ms of 5,732/5,773 ms versus 16,237/8,059 ms and whole-protocol frames over 50 ms of 47%/42% versus 52%/55%. These are encouraging, but are not main versus this head's compiled defaults; FPS 1% lows and p99, other scenes and the cost to higher-priority work are not reported. Farm runs are queued, and explicitly do not test the compiled default.
Other systems: The scheduler is shared by guest threads and all platforms: a 30 ms boost can delay higher-priority work, including in other scenes and on other small-core machines. Ordinary non-Deck builds retain 1 s; a binary built with the flag retains 30 ms even if moved to another machine. Deck OLED, other handhelds, Windows/Linux and other CPU tiers need evidence for any expanded default. No save, audio, GPU or renderer interface changes are apparent.
Switches: LONGSHOT_DECK is a new build-time variable, unset by default, with 1 selecting 30 ms; it is not set by the normal build paths. HOS_VCORE_STARVE_US remains a runtime override, including 0 to disable the boost; its compiled default becomes 30 ms only in that profile, otherwise 1 s. The profile's default and distribution are not yet justified by measurements.

Reviewed: 2b959bd67f against 89c3d21ea1: Read tests/test_vcore_escape.py, base AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md and the PR template in full; read the entire diff. The tool truncated host/hos_thread.c and nx2/build.py, so their unchanged portions were skimmed rather than read in full; inspected the changed hunks and scheduler fixture. docs/review-checklist.md does not exist. No generated files or translations changed. Tooling's separate AGENTS.md was not available through the repository file reader.; nothing run (a code review).
Checked and fine:

  • The fixture exercises both compiled profiles and the zero override, using actual scheduler code; the duplicate declaration fix permits its C++ compilation as reported.
  • No third-party, shader, renderer ABI, saved setting or game data changes appear in the diff.

Blocking (to change before merge)

  1. nx2/build.py:597: Nothing in the repository sets LONGSHOT_DECK for a normal Deck installation, so a player building or updating normally keeps the 1 s threshold and receives none of the intended improvement. Select the measured default automatically at runtime for the appropriate hardware, or wire and test an actual supported build/distribution path that guarantees the profile; avoid requiring players to discover a build variable.

Testing: Author reports four fixture passes and a Deck runtime-override experiment; the farm has no reports yet. No code was run in this review. Measure main versus head defaults, including frame-time tails and priority-sensitive scenes, and verify the real installer/build path; report the full test suite and platform builds.
Overlaps and merge order: Open #327 also changes virtual-core affinity and migration; coordinate scheduler review and retest after whichever lands first. Open #1875 changes virtual-core availability during zstd and targets the same Deck/market contention; compare combined results and retest after merge. Neither is necessarily a duplicate.

-# Automated code review by IssueBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The measured threshold is not enabled by any normal Deck build path, so Deck players get the old default unless they discover and set a build-time variable themselves. The threshold looks promising in one Deck experiment, but this branch's shipping behavior and its wider scheduling costs remain unmeasured. The change lowers the starvation threshold only when the builder receives LONGSHOT_DECK=1, and adds a two-profile scheduler fixture. The runtime override experiment suggests fewer long waits, but the proposed build-time gate does not reach ordinary Deck installations and adds a hardware-specific build profile rather than choosing a default for the machine running the game. **Does it help:** Unproven for this PR as shipped. On a Deck LCD, two interleaved runtime-override arms reported waits over 20 ms of 5,732/5,773 ms versus 16,237/8,059 ms and whole-protocol frames over 50 ms of 47%/42% versus 52%/55%. These are encouraging, but are not main versus this head's compiled defaults; FPS 1% lows and p99, other scenes and the cost to higher-priority work are not reported. Farm runs are queued, and explicitly do not test the compiled default. **Other systems:** The scheduler is shared by guest threads and all platforms: a 30 ms boost can delay higher-priority work, including in other scenes and on other small-core machines. Ordinary non-Deck builds retain 1 s; a binary built with the flag retains 30 ms even if moved to another machine. Deck OLED, other handhelds, Windows/Linux and other CPU tiers need evidence for any expanded default. No save, audio, GPU or renderer interface changes are apparent. **Switches:** LONGSHOT_DECK is a new build-time variable, unset by default, with 1 selecting 30 ms; it is not set by the normal build paths. HOS_VCORE_STARVE_US remains a runtime override, including 0 to disable the boost; its compiled default becomes 30 ms only in that profile, otherwise 1 s. The profile's default and distribution are not yet justified by measurements. **Reviewed:** 2b959bd67fa8 against 89c3d21ea169: Read tests/test_vcore_escape.py, base AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md and the PR template in full; read the entire diff. The tool truncated host/hos_thread.c and nx2/build.py, so their unchanged portions were skimmed rather than read in full; inspected the changed hunks and scheduler fixture. docs/review-checklist.md does not exist. No generated files or translations changed. Tooling's separate AGENTS.md was not available through the repository file reader.; nothing run (a code review). **Checked and fine:** - The fixture exercises both compiled profiles and the zero override, using actual scheduler code; the duplicate declaration fix permits its C++ compilation as reported. - No third-party, shader, renderer ABI, saved setting or game data changes appear in the diff. **Blocking** (to change before merge) 1. nx2/build.py:597: Nothing in the repository sets LONGSHOT_DECK for a normal Deck installation, so a player building or updating normally keeps the 1 s threshold and receives none of the intended improvement. Select the measured default automatically at runtime for the appropriate hardware, or wire and test an actual supported build/distribution path that guarantees the profile; avoid requiring players to discover a build variable. **Testing:** Author reports four fixture passes and a Deck runtime-override experiment; the farm has no reports yet. No code was run in this review. Measure main versus head defaults, including frame-time tails and priority-sensitive scenes, and verify the real installer/build path; report the full test suite and platform builds. **Overlaps and merge order:** Open #327 also changes virtual-core affinity and migration; coordinate scheduler review and retest after whichever lands first. Open #1875 changes virtual-core availability during zstd and targets the same Deck/market contention; compare combined results and retest after merge. Neither is necessarily a duplicate. -# Automated code review by IssueBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -590,0 +594,4 @@
# turn (measured 2x2 on an LCD Deck, Castle Town market, full-speed turns: waits over 20 ms 16,237 to 5,732 ms a boot,
# idle frames over 50 ms 41% to 23%, no escapes in either arm; https://git.magicbean.dev/MagicBeanDev/Longshot/issues/1477).
# HOS_VCORE_STARVE_US overrides either way. Unset: the 1 s Horizon rule, as everywhere.
DECK = os.environ.get("LONGSHOT_DECK", "") == "1"
Member

What sets this for a player's normal Deck build? No other repository reference sets it, so an ordinary install/update keeps the 1 s default and never receives the measured improvement; a binary copied elsewhere also keeps the Deck policy. Please select the appropriate default at runtime, or wire and test a supported build path that actually enables this profile.

What sets this for a player's normal Deck build? No other repository reference sets it, so an ordinary install/update keeps the 1 s default and never receives the measured improvement; a binary copied elsewhere also keeps the Deck policy. Please select the appropriate default at runtime, or wire and test a supported build path that actually enables this profile.
Merge current main into deck-vcore-starve
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 12s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 14s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 17s
PR description / Description follows the template (pull_request_target) Successful in 19s
CI / Website build and checks (pull_request) Failing after 14s
beanstalk/approval not approved yet
20b4262c41
The 30 ms starvation threshold is chosen from the renderer's own device
name (the Steam Deck's APU) instead of the LONGSHOT_DECK build flag, so a
normal Deck build gets it. HOS_VCORE_STARVE_US still overrides. The test
fixture covers the Deck and desktop renderer names.

Assisted-by: Hermes Agent (deepseek-flash)
Member

Beanstalk test farm

Commit 20b4262 · approved by nobody yet · dashboard

A member of BigBeans can review this commit and comment @Beanstalk to test it.

<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `20b4262` · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/1860) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
omgitsgela changed title from WIP: perf(thread): a Deck build lets a starved guest thread take a core after 30 ms, not 1 s to WIP: perf(thread): on the Steam Deck, a starved guest thread takes a core after 30 ms, not 1 s 2026-11-21 02:07:33 +00:00
Author
Member

The build-time flag is gone. The starvation default now comes from the renderer's existing device facts: the renderer already names the GPU it runs on, so Custom GPU 0405 (Deck LCD) and Custom GPU 0932 (Deck OLED) get 30 ms, and every other device keeps Horizon's 1 s. HOS_VCORE_STARVE_US still overrides both. Head is 20b4262c.

The test fixture now gives the vcore block the Deck's renderer name for one profile and a desktop GPU's for the other, and checks the LCD, OLED and desktop names. tests/test_vcore_escape.py passes under g++.

Tonight's A/B is written into the description:

  1. Build then-latest main as the +0 arm.
  2. Merge then-latest main into deck-vcore-starve and build the +1860 arm.
  3. Run Castle Town with HOS_VCORE_STARVE_US unset in both arms, same save and warm caches, two runs per arm interleaved.
  4. The vcores: Steam Deck hardware: ... 30 ms log line should appear only in the +1860 arm.
  5. Record waits over 20 ms, frames over 50 ms, fps with 1% low and p99, and escapes.

The farm's any cell did not fail on this code: its report is a tester sandbox error (git rev-parse and /dev/null permission). The two Steam Deck cells are still building. After the A/B, the farm can be rerun against the real default instead of an env override.

The build-time flag is gone. The starvation default now comes from the renderer's existing device facts: the renderer already names the GPU it runs on, so `Custom GPU 0405` (Deck LCD) and `Custom GPU 0932` (Deck OLED) get 30 ms, and every other device keeps Horizon's 1 s. `HOS_VCORE_STARVE_US` still overrides both. Head is `20b4262c`. The test fixture now gives the vcore block the Deck's renderer name for one profile and a desktop GPU's for the other, and checks the LCD, OLED and desktop names. `tests/test_vcore_escape.py` passes under g++. Tonight's A/B is written into the description: 1. Build `then-latest main` as the `+0` arm. 2. Merge `then-latest main` into `deck-vcore-starve` and build the `+1860` arm. 3. Run Castle Town with `HOS_VCORE_STARVE_US` unset in both arms, same save and warm caches, two runs per arm interleaved. 4. The `vcores: Steam Deck hardware: ... 30 ms` log line should appear only in the +1860 arm. 5. Record waits over 20 ms, frames over 50 ms, fps with 1% low and p99, and escapes. The farm's `any` cell did not fail on this code: its report is a tester sandbox error (`git rev-parse` and `/dev/null` permission). The two Steam Deck cells are still building. After the A/B, the farm can be rerun against the real default instead of an env override.
Author
Member

Changed-file check on the pushed head 20b4262c: tests/run_all.py --changed origin/main is 20 passed / 5 failed / 2 skipped. All five also fail on clean main here: test_crash_record, test_dev_packs, test_profiling_mode, test_slow_frames, and test_vcore_mask0 (the last one also fails to compile on main with g++). tests/test_vcore_escape.py itself is green.

No Deck work was run from here; the current latest +0 build is untouched.

Changed-file check on the pushed head `20b4262c`: `tests/run_all.py --changed origin/main` is 20 passed / 5 failed / 2 skipped. All five also fail on clean main here: `test_crash_record`, `test_dev_packs`, `test_profiling_mode`, `test_slow_frames`, and `test_vcore_mask0` (the last one also fails to compile on main with g++). `tests/test_vcore_escape.py` itself is green. No Deck work was run from here; the current `latest +0` build is untouched.
Author
Member

Closing this as dropped.

Tested on a clean latest-nightly A/B on the Steam Deck LCD: 846e5399 (nightly-649) against 21efecc24 (nightly-649 plus this change, version nightly-649 +1860, source 3a4d2b76), Castle Town center save (Market_Child), scripted camera turns and forward/back movement, GPU and CPU clocks pinned, two runs per arm at 100% render and one at 50%. HOS_VCORE_STARVE_US was unset; the 30 ms value was the compiled Deck default.

The rule does what it says to the scheduler: 509/454 starvation grants against 1/1, and the longest single core wait fell from 1000.8/1000.3 ms to 107.2/415.8 ms. But the frame-time tail got worse, not better:

  • 100% render: frames over 50 ms 21.0/18.3% -> 22.3/24.4%; fps 21.8/22.0 -> 21.5/21.4; p99 85.6/88.0 -> 94.7/87.4 ms.
  • 50% render: frames over 50 ms 6.9% -> 12.7%; fps 25.6 -> 24.6; p99 68.9 -> 78.0 ms.

It trades a rare one-second stall for more frequent 50 ms+ stalls during play, which is the wrong direction for the camera-turn hitches this was meant to fix. The only positive was an idle-only 50% arm (28.2 against 26.6 fps, >50 ms 1.5% against 4.7%), and it did not survive movement.

No further version will be pushed; the branch stays for history. If this is revisited, the narrow worth testing is a steal that only takes cores from holders below the frame-critical priorities, or only for loading/streaming waiters, and it needs the same whole-protocol p99 and >50 ms scoring.

Record note: the pushed head 20b4262c still gates the 30 ms value behind the LONGSHOT_DECK build flag in host/hos_thread.c; it does not contain the renderer device-name default described above. The A/B above tested that build-flag implementation.

Thanks to HumanBean, BeanBot and the Beanstalk testers for the review and farm runs.

Closing this as dropped. Tested on a clean latest-nightly A/B on the Steam Deck LCD: `846e5399` (nightly-649) against `21efecc24` (nightly-649 plus this change, version `nightly-649 +1860`, source `3a4d2b76`), Castle Town center save (`Market_Child`), scripted camera turns and forward/back movement, GPU and CPU clocks pinned, two runs per arm at 100% render and one at 50%. `HOS_VCORE_STARVE_US` was unset; the 30 ms value was the compiled Deck default. The rule does what it says to the scheduler: 509/454 starvation grants against 1/1, and the longest single core wait fell from 1000.8/1000.3 ms to 107.2/415.8 ms. But the frame-time tail got worse, not better: - 100% render: frames over 50 ms 21.0/18.3% -> 22.3/24.4%; fps 21.8/22.0 -> 21.5/21.4; p99 85.6/88.0 -> 94.7/87.4 ms. - 50% render: frames over 50 ms 6.9% -> 12.7%; fps 25.6 -> 24.6; p99 68.9 -> 78.0 ms. It trades a rare one-second stall for more frequent 50 ms+ stalls during play, which is the wrong direction for the camera-turn hitches this was meant to fix. The only positive was an idle-only 50% arm (28.2 against 26.6 fps, >50 ms 1.5% against 4.7%), and it did not survive movement. No further version will be pushed; the branch stays for history. If this is revisited, the narrow worth testing is a steal that only takes cores from holders below the frame-critical priorities, or only for loading/streaming waiters, and it needs the same whole-protocol p99 and >50 ms scoring. Record note: the pushed head `20b4262c` still gates the 30 ms value behind the `LONGSHOT_DECK` build flag in `host/hos_thread.c`; it does not contain the renderer device-name default described above. The A/B above tested that build-flag implementation. Thanks to HumanBean, BeanBot and the Beanstalk testers for the review and farm runs.
omgitsgela closed this pull request 2026-11-21 04:59:37 +00:00
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 12s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 14s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 17s
PR description / Description follows the template (pull_request_target) Successful in 19s
CI / Website build and checks (pull_request) Failing after 14s
beanstalk/approval not approved yet

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
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
MagicBeanDev/Longshot!1860
No description provided.