gpu: cap idle staging pool blocks by host RAM and STAGING_KEPT #186

Closed
Androtim wants to merge 0 commits from upstream-pr/186 into main
Androtim commented 2026-11-30 02:39:55 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T02:39:55Z.


Summary

  • Extract pool::staging_spares(limit, critical, pressure, limited_ram) and use it in pool::room() instead of passing limit (up to SPARE_KEPT = 64 blocks) directly to STAGING.reclaim(...).
  • Bound retained empty staging blocks to 0 under critical OS commit headroom, 1 under host memory pressure, 2 on hosts with <= 32 GiB physical RAM, and STAGING_KEPT.min(limit) otherwise so idle upload storage does not grow toward 4 GiB.
  • Added unit test pool::tests::staging_spares_respects_commit_pressure_and_ram_caps.

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy (311 files ok)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu pool:: -- --test-threads=1 (16 passed; 0 failed; 1 ignored)
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings
  • Live 75s Series S verification (PlayParity, 8 GB VRAM / 32 GiB RAM host): median 12.85 fps, over=0 MB (used_max=6774 MB / budget_min=6868 MB, room_false=83.3%), final_waiting=3972, not made=125, lit=20/24 (luma=103.14, magenta=0.0%), mapped_rate=8.08 ms/s, 0 crashes; late captured PNGs visually verified crisp.
  • Live 75s Series X 1440p verification (PlayParity, 8 GB VRAM / 32 GiB RAM host): median 10.65 fps, over=0 MB (used_max=6870 MB / budget_min=6849 MB, room_false=100.0%), final_waiting=13618 (reflecting 8 GB VRAM budget pressure with 1632 MB 1440p render targets and ~905 MB available commit), lit=18/24 (luma=106.88, magenta=0.0%), 0 crashes; late captured PNGs visually verified crisp.
<!-- greyfinch-sync:Androtim/MiniVI:issue:5557993258 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/186). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-30T02:39:55Z. --- ## Summary - Extract `pool::staging_spares(limit, critical, pressure, limited_ram)` and use it in `pool::room()` instead of passing `limit` (up to `SPARE_KEPT = 64` blocks) directly to `STAGING.reclaim(...)`. - Bound retained empty staging blocks to `0` under critical OS commit headroom, `1` under host memory pressure, `2` on hosts with `<= 32 GiB` physical RAM, and `STAGING_KEPT.min(limit)` otherwise so idle upload storage does not grow toward 4 GiB. - Added unit test `pool::tests::staging_spares_respects_commit_pressure_and_ram_caps`. ## Verification - `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy` (`311 files ok`) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu pool:: -- --test-threads=1` (`16 passed; 0 failed; 1 ignored`) - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings` - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings` - Live 75s Series S verification (`PlayParity`, 8 GB VRAM / 32 GiB RAM host): median `12.85 fps`, `over=0 MB` (`used_max=6774 MB / budget_min=6868 MB`, `room_false=83.3%`), `final_waiting=3972`, `not made=125`, `lit=20/24` (`luma=103.14`, `magenta=0.0%`), `mapped_rate=8.08 ms/s`, `0` crashes; late captured PNGs visually verified crisp. - Live 75s Series X 1440p verification (`PlayParity`, 8 GB VRAM / 32 GiB RAM host): median `10.65 fps`, `over=0 MB` (`used_max=6870 MB / budget_min=6849 MB`, `room_false=100.0%`), `final_waiting=13618` (reflecting 8 GB VRAM budget pressure with `1632 MB` 1440p render targets and `~905 MB` available commit), `lit=18/24` (`luma=106.88`, `magenta=0.0%`), `0` crashes; late captured PNGs visually verified crisp.
Androtim commented 2026-11-30 03:04:45 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T03:04:45Z.


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).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7267566586 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/186#issuecomment-7267566586). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-30T03:04:45Z. --- <!-- minivi-triage v1 head=f94d1fd21b867dee5b2e9269e98f6218ea5b6a0a 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`)._
Androtim commented 2026-12-01 01:38:09 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-01T01:38:09Z.


Closing as superseded by newer merged/tracked work per #276 (Core Architecture Rewrite Backlog).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7297723231 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/186#issuecomment-7297723231). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-01T01:38:09Z. --- Closing as superseded by newer merged/tracked work per #276 (Core Architecture Rewrite Backlog).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Androtim/MiniVI!186
No description provided.