gpu(host,list): release scratch at landing and reclaim idle lists and fetch buffers under pressure #179

Closed
github-bot wants to merge 1 commit from gh-pr/179/head into gh-pr/179/base
Owner

@⁠Androtim on GitHub · 2026-11-30 01:34 UTC · original
Androtim:feat/iter176-gpu-idle-reclaim-scratch-landing-fetch-shrink → main · +211 −22 · 2 files · 1 commits · closed without merging

Summary

  • Pressure-gated idle host-list trimming (list.rs, host.rs):
    • Replaced list::trim_on_pressure with list::trim_idle(now) (backed by trim_idle_count), retiring idle host lists older than 2_000 ms only when host memory is pressured while preserving a warm reserve of 16 recent lists and counting TRIMMED_LISTS.
    • Added VICTORY_IDLE_RECLAIM (idle_reclaim(), enabled by default; 0 opts out).
  • Release scratch chunks at landing (list.rs, host.rs):
    • Added HostList::release_scratch, Detached::release_scratch, and spare_what_fits, returning scratch chunks that fit inside SPARE at submission landing (in both async relay_land after read-backs and synchronous settle) while keeping any overflow on the list until reset() so nothing is freed prematurely.
    • Added VICTORY_SCRATCH_AT_LANDING toggle (enabled by default; 0 restores reset-only return).
  • Timed fetch-buffer shrinking (host.rs):
    • Tracked peak-use timestamps (fetched_large_at on CardWork, buffer_large_at on RelayFetch) and added Host::resize_fetch / fetch_resize_action before card-back fetches.
    • Under host memory pressure and VICTORY_IDLE_RECLAIM (enabled by default), oversized fetch buffers that stay below capacity for at least 2_000 ms shrink to needed.next_multiple_of(16 MiB) (or release when 0), preserving peak allocation capacity during normal workloads.

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy: asset policy: 311 files ok
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu list:: -- --test-threads=1: 15 passed; 0 failed (including new trim_idle_keeps_warm_reserve_and_recent_lists)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu host:: -- --test-threads=1: 147 passed; 0 failed; 17 ignored (including new fetch_resize_action_covers_grow_hold_release_and_pressure_shrink)
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings (default and --features diagnostics): clean
  • Live GPU verification (75s in-world -PlayParity -AutoNudgeMenu):
    • Xbox Series S: 12.9 fps median (77.7 ms), preparing 38.9 ms, copyback 12.8 ms, VRAM peak 6522 MB / budget min 6873 MB (over=0 MB), 60972 textures uploaded, final_waiting=4573, mapped_rate=5.36 ms/s (down from 8.43 ms/s), 18/24 lit PNGs (luma=105.67, edge_energy=6.99, magenta=0.0%), 0 crashes.
    • Xbox Series X (1440p): 11.7 fps median (85.7 ms, up from 10.45 fps), preparing 41.55 ms, copyback 15.35 ms, mapped_rate=6.62 ms/s (down from 18.27 ms/s), 19/24 lit PNGs (luma=96.24, edge_energy=6.69, magenta=0.0%), 0 crashes.
**@⁠Androtim** on GitHub · 2026-11-30 01:34 UTC · [original](https://github.com/Androtim/MiniVI/pull/179) `Androtim:feat/iter176-gpu-idle-reclaim-scratch-landing-fetch-shrink` → `main` · +211 −22 · 2 files · 1 commits · closed without merging ## Summary - **Pressure-gated idle host-list trimming (`list.rs`, `host.rs`):** - Replaced `list::trim_on_pressure` with `list::trim_idle(now)` (backed by `trim_idle_count`), retiring idle host lists older than `2_000 ms` only when host memory is pressured while preserving a warm reserve of `16` recent lists and counting `TRIMMED_LISTS`. - Added `VICTORY_IDLE_RECLAIM` (`idle_reclaim()`, enabled by default; `0` opts out). - **Release scratch chunks at landing (`list.rs`, `host.rs`):** - Added `HostList::release_scratch`, `Detached::release_scratch`, and `spare_what_fits`, returning scratch chunks that fit inside `SPARE` at submission landing (in both async `relay_land` after read-backs and synchronous `settle`) while keeping any overflow on the list until `reset()` so nothing is freed prematurely. - Added `VICTORY_SCRATCH_AT_LANDING` toggle (enabled by default; `0` restores reset-only return). - **Timed fetch-buffer shrinking (`host.rs`):** - Tracked peak-use timestamps (`fetched_large_at` on `CardWork`, `buffer_large_at` on `RelayFetch`) and added `Host::resize_fetch` / `fetch_resize_action` before card-back fetches. - Under host memory pressure and `VICTORY_IDLE_RECLAIM` (enabled by default), oversized fetch buffers that stay below capacity for at least `2_000 ms` shrink to `needed.next_multiple_of(16 MiB)` (or release when `0`), preserving peak allocation capacity during normal workloads. ## Verification - `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy`: `asset policy: 311 files ok` - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu list:: -- --test-threads=1`: `15 passed; 0 failed` (including new `trim_idle_keeps_warm_reserve_and_recent_lists`) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu host:: -- --test-threads=1`: `147 passed; 0 failed; 17 ignored` (including new `fetch_resize_action_covers_grow_hold_release_and_pressure_shrink`) - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings` (default and `--features diagnostics`): clean - **Live GPU verification (75s in-world `-PlayParity -AutoNudgeMenu`):** - **Xbox Series S:** `12.9 fps` median (`77.7 ms`), `preparing 38.9 ms`, `copyback 12.8 ms`, VRAM peak `6522 MB` / budget min `6873 MB` (`over=0 MB`), `60972` textures uploaded, `final_waiting=4573`, `mapped_rate=5.36 ms/s` (down from `8.43 ms/s`), `18/24` lit PNGs (`luma=105.67`, `edge_energy=6.99`, `magenta=0.0%`), `0` crashes. - **Xbox Series X (`1440p`):** `11.7 fps` median (`85.7 ms`, up from `10.45 fps`), `preparing 41.55 ms`, `copyback 15.35 ms`, `mapped_rate=6.62 ms/s` (down from `18.27 ms/s`), `19/24` lit PNGs (`luma=96.24`, `edge_energy=6.69`, `magenta=0.0%`), `0` crashes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:16:17 +00:00
github-bot closed this pull request 2026-12-01 20:16:17 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 02:03 UTC · original · edited 2026-11-30 16:02 UTC

Automated triage for the maintainers (not an approval).

Verdict: needs-rebase · CI (check): passing

This PR no longer merges cleanly into main.

To change the verdict: Rebase onto current main and resolve conflicts; CI and triage will run again automatically.


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-30 02:03 UTC · [original](https://github.com/Androtim/MiniVI/pull/179#issuecomment-7266667400) · edited 2026-11-30 16:02 UTC <!-- minivi-triage v1 head=897e54d60b24e5a93ad6852be7b6a6a37fad76fc verdict=needs-rebase ci=passing at=2026-11-30T16:02:50Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-rebase` · **CI (`check`):** `passing` This PR no longer merges cleanly into `main`. **To change the verdict:** Rebase onto current `main` and resolve conflicts; CI and triage will run again automatically. --- _Generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 08:40 UTC · original

GitHub reports merge conflicts against current main after Wave 6 merged. Please rebase onto latest main.

**@⁠Androtim** on GitHub · 2026-11-30 08:40 UTC · [original](https://github.com/Androtim/MiniVI/pull/179#issuecomment-7273211256) GitHub reports merge conflicts against current `main` after Wave 6 merged. Please rebase onto latest `main`.
Author
Owner

@⁠Androtim on GitHub · 2026-12-01 01:38 UTC · original

Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.

**@⁠Androtim** on GitHub · 2026-12-01 01:38 UTC · [original](https://github.com/Androtim/MiniVI/pull/179#issuecomment-7297735628) Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.

Pull request closed

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/Androtim--MiniVI!179
No description provided.