victory-gpu: budget-reactive card pools, 4 MiB shared heaps, and CPU-only shadow staging #322

Merged
Androtim merged 1 commit from upstream-pr/322 into main 2026-12-02 10:19:08 +00:00
Androtim commented 2026-12-02 09:50:28 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T09:50:28Z.


Summary

Replaces fixed buffer-ahead caps, 16 MiB shared buffer pool blocks, eager VRAM-staging allocation/residency waits for card-backed shadows, and leaked abandoned thin-list state in victory-gpu with budget-reactive pooling and immediate reclamation:

  1. Budget-reactive CARD pool limits & 4 MiB small/large SharedPool (crates/victory-gpu/src/ahead.rs):
    • Replaces static 4096/1024 CARD pool limits with ahead_limits(budget, explicit) (1024/256 when adapter budget < 12 GiB, 4096/1024 on >= 12 GiB GPUs, still honoring explicit VICTORY_BUFFERS_AHEAD) and card_trim_len(len, budget, used) to drain idle CARD spares to 0 under VRAM pressure (>= 75% of budget or < 1024 MiB remaining).
    • Shrinks SharedBlock from 16 MiB (256 slots, [u64; 4]) to 4 MiB (64 slots, single u64 bitmask), splits SHARED_POOL into SHARED_SMALL_POOL (slots == 1) and SHARED_LARGE_POOL (slots > 1), reduces idle trim threshold REST_MS from 2500 ms to 500 ms, trims both pools in trim_shared_pool, and exports live_shared_heaps in note_pool_progress().
  2. CPU-only shadow staging when VRAM-backed & accurate by_address VRAM accounting (crates/victory-gpu/src/shadow.rs):
    • When on_card.is_some() in lookup, by_address, and loose_inner, allocates CPU-only staging via host.shared_buffer_staging(...) instead of pinning SHARED_POOL heaps or stalling on synchronous MakeResident / copy-queue mapped() waits (with OOM rollback guards).
    • Fixes by_address to count WINDOW_CARD_BYTES and BY_ADDRESS_USED only when card-backed (vram_counted / by_address_vram), properly decrementing both in Drop for Shadow, and prunes dead Weak entries from CARDED in let_go_idle().
  3. Immediate thin-list Upload reclaim & BACKS_CAP (crates/victory-gpu/src/list/thin.rs):
    • Calls drop_untranslated_uploads(stream) in both Front::leave() and Recording::drop() so abandoned recordings return Box<Upload> arena slots right away.
    • Caps retained BACKS in Recording::drop() at BACKS_CAP = 256, releasing excess lists via crate::object::release_boxed::<List>.

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu xtask policy: PASS (asset policy: 322 files ok)
  • Targeted unit tests (cargo +1.98.1-x86_64-pc-windows-gnu test --locked on ahead::tests, shadow::, list::thin::tests): 77 passed, 0 failed, 3 ignored (including new ahead_limits_and_card_trim_react_to_vram_budget and abandoned_upload_ops_reclaim_arena_slots, and ahead::tests 9/9 re-verified)
  • Dual workspace clippy -- -D warnings (default + --features diagnostics): PASS
  • Plain --release --bin MiniVI --locked + objdump -p: PASS (standard Windows DLLs only)
  • --features diagnostics 1440p 90s in-world verification (diag-pr-bufpool-1440p-90s): PASS (6/6 gates)
    • world_windows=21, max_draws=12830, crashes=0, no_host_texture_errors=0, used_max=6267 MB / budget_min=6775 MB, final_waiting=2588, mapped_rate=1.05 ms/s (4600 calls, 337.3 ms, longest 9.7 ms), pngs=24, lit=20/24, luma=100.0, near_black=0.07%, edge_energy=7.89, magenta=0.0%
    • Visually inspected the 3 largest world PNGs (frame-1952.png, frame-1960.png, frame-1966.png): clean lighting, water, foliage, structures, character, and HUD with zero visual regressions.

Paired Same-Path Plain---release A/B Benchmarks vs main (89a194b)

Both runs executed on RTX 4060 Ti 8 GB / i7-13700F / 32 GB RAM from D:\victory-build\minivi\release\victory.exe (-PlayParity -AutoNudgeMenu -WorldSeconds 90). Zero crashes, panics, or DRED faults.

1440p (90s world window)

Metric main (89a194b) PR (feat/dynamic-buffer-pools-and-shadow-reclaim) Delta
Median FPS / frame time 14.8 fps (67.6 ms) 15.2 fps (65.8 ms) +0.4 fps (-1.8 ms)
VRAM used_max 6,327 MB 6,177 MB -150 MB
Dedicated VRAM (median) 6,061 MB 5,954 MB -107 MB
room_false 5.6% 0.0% -5.6 pp
pool_not_made 88 0 -88
final_waiting 3,421 2,268 -1,153 (-33.7%)
mapped() stall rate 7.95 ms/s 1.53 ms/s -80.8%
Longest mapped() stall 19.4 ms 10.3 ms -9.1 ms
title_present_wait_ms (avg / med) 23.48 ms / 19.10 ms 18.75 ms / 16.20 ms -4.73 ms / -2.90 ms
card_idle_behind_ms (avg / med) 7.20 ms / 7.20 ms 6.50 ms / 6.10 ms -0.70 ms / -1.10 ms
Process working_set_mb (max) 19,650 MB 19,388 MB -262 MB
Process private_commit_mb (med / max) 20,686 MB / 21,189 MB 20,510 MB / 20,895 MB -176 MB / -294 MB
SharedPool footprint 209 * 16 MiB = 3,344 MiB 676 live * 4 MiB = 2,704 MiB (121 trimmed: 797 -> 676) -640 MiB

4K DLSS Quality (90s world window)

Metric main (89a194b) PR (feat/dynamic-buffer-pools-and-shadow-reclaim) Delta
preparing (report) 20.25 ms 18.1 ms -2.15 ms (-10.6%)
preparing_core_ms (avg / med) 33.93 ms / 35.80 ms 27.66 ms / 29.60 ms -6.27 ms / -6.20 ms (-17.3%)
thin_ms (avg / med) 623.58 ms / 716.60 ms 519.86 ms / 627.80 ms -103.72 ms / -88.80 ms
mapped() stall rate 10.61 ms/s 1.44 ms/s -86.4%
Process working_set_mb (avg / med / max) 17,499 / 19,694 / 20,284 MB 16,609 / 19,363 / 19,841 MB -890 / -331 / -443 MB
Process private_commit_mb (avg / med) 19,780 / 21,478 MB 19,000 / 21,212 MB -780 / -266 MB
Shared VRAM shared_mb (avg / med / max) 4,920 / 5,614 / 5,775 MB 4,482 / 5,354 / 5,578 MB -438 / -260 / -197 MB
Dedicated VRAM dedicated_mb (avg) 5,691 MB 5,448 MB -243 MB
final_waiting 12,470 11,203 -1,267
SharedPool footprint 229 * 16 MiB = 3,664 MiB 796 live * 4 MiB = 3,184 MiB (110 trimmed: 906 -> 796) -480 MiB
Median FPS / frame time 6.4 fps (155.95 ms) 6.3 fps (157.8 ms) GPU-bound variance (-0.1 fps)
<!-- greyfinch-sync:Androtim/MiniVI:issue:5603971609 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/322). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-02T09:50:28Z. --- ## Summary Replaces fixed buffer-ahead caps, 16 MiB shared buffer pool blocks, eager VRAM-staging allocation/residency waits for card-backed shadows, and leaked abandoned thin-list state in `victory-gpu` with budget-reactive pooling and immediate reclamation: 1. **Budget-reactive `CARD` pool limits & `4 MiB` small/large `SharedPool` (`crates/victory-gpu/src/ahead.rs`)**: - Replaces static `4096`/`1024` `CARD` pool limits with `ahead_limits(budget, explicit)` (`1024`/`256` when adapter budget `< 12 GiB`, `4096`/`1024` on `>= 12 GiB` GPUs, still honoring explicit `VICTORY_BUFFERS_AHEAD`) and `card_trim_len(len, budget, used)` to drain idle `CARD` spares to `0` under VRAM pressure (`>= 75%` of budget or `< 1024 MiB` remaining). - Shrinks `SharedBlock` from `16 MiB` (`256` slots, `[u64; 4]`) to `4 MiB` (`64` slots, single `u64` bitmask), splits `SHARED_POOL` into `SHARED_SMALL_POOL` (`slots == 1`) and `SHARED_LARGE_POOL` (`slots > 1`), reduces idle trim threshold `REST_MS` from `2500 ms` to `500 ms`, trims both pools in `trim_shared_pool`, and exports `live_shared_heaps` in `note_pool_progress()`. 2. **CPU-only shadow staging when VRAM-backed & accurate `by_address` VRAM accounting (`crates/victory-gpu/src/shadow.rs`)**: - When `on_card.is_some()` in `lookup`, `by_address`, and `loose_inner`, allocates CPU-only staging via `host.shared_buffer_staging(...)` instead of pinning `SHARED_POOL` heaps or stalling on synchronous `MakeResident` / copy-queue `mapped()` waits (with OOM rollback guards). - Fixes `by_address` to count `WINDOW_CARD_BYTES` and `BY_ADDRESS_USED` only when card-backed (`vram_counted` / `by_address_vram`), properly decrementing both in `Drop for Shadow`, and prunes dead `Weak` entries from `CARDED` in `let_go_idle()`. 3. **Immediate thin-list `Upload` reclaim & `BACKS_CAP` (`crates/victory-gpu/src/list/thin.rs`)**: - Calls `drop_untranslated_uploads(stream)` in both `Front::leave()` and `Recording::drop()` so abandoned recordings return `Box<Upload>` arena slots right away. - Caps retained `BACKS` in `Recording::drop()` at `BACKS_CAP = 256`, releasing excess lists via `crate::object::release_boxed::<List>`. ## Verification - `cargo +1.98.1-x86_64-pc-windows-gnu xtask policy`: **PASS** (`asset policy: 322 files ok`) - Targeted unit tests (`cargo +1.98.1-x86_64-pc-windows-gnu test --locked` on `ahead::tests`, `shadow::`, `list::thin::tests`): **77 passed, 0 failed, 3 ignored** (including new `ahead_limits_and_card_trim_react_to_vram_budget` and `abandoned_upload_ops_reclaim_arena_slots`, and `ahead::tests` 9/9 re-verified) - Dual workspace `clippy -- -D warnings` (default + `--features diagnostics`): **PASS** - Plain `--release --bin MiniVI --locked` + `objdump -p`: **PASS** (standard Windows DLLs only) - **`--features diagnostics` 1440p 90s in-world verification (`diag-pr-bufpool-1440p-90s`)**: **PASS (6/6 gates)** - `world_windows=21, max_draws=12830`, `crashes=0`, `no_host_texture_errors=0`, `used_max=6267 MB / budget_min=6775 MB`, `final_waiting=2588`, `mapped_rate=1.05 ms/s` (`4600` calls, `337.3 ms`, longest `9.7 ms`), `pngs=24, lit=20/24, luma=100.0, near_black=0.07%, edge_energy=7.89, magenta=0.0%` - Visually inspected the 3 largest world PNGs (`frame-1952.png`, `frame-1960.png`, `frame-1966.png`): clean lighting, water, foliage, structures, character, and HUD with zero visual regressions. ## Paired Same-Path Plain-`--release` A/B Benchmarks vs `main` (`89a194b`) Both runs executed on RTX 4060 Ti 8 GB / i7-13700F / 32 GB RAM from `D:\victory-build\minivi\release\victory.exe` (`-PlayParity -AutoNudgeMenu -WorldSeconds 90`). Zero crashes, panics, or DRED faults. ### 1440p (90s world window) | Metric | `main` (`89a194b`) | PR (`feat/dynamic-buffer-pools-and-shadow-reclaim`) | Delta | |---|---:|---:|---:| | Median FPS / frame time | `14.8 fps` (`67.6 ms`) | `15.2 fps` (`65.8 ms`) | `+0.4 fps` (`-1.8 ms`) | | VRAM `used_max` | `6,327 MB` | `6,177 MB` | `-150 MB` | | Dedicated VRAM (median) | `6,061 MB` | `5,954 MB` | `-107 MB` | | `room_false` | `5.6%` | `0.0%` | `-5.6 pp` | | `pool_not_made` | `88` | `0` | `-88` | | `final_waiting` | `3,421` | `2,268` | `-1,153` (`-33.7%`) | | `mapped()` stall rate | `7.95 ms/s` | `1.53 ms/s` | `-80.8%` | | Longest `mapped()` stall | `19.4 ms` | `10.3 ms` | `-9.1 ms` | | `title_present_wait_ms` (avg / med) | `23.48 ms` / `19.10 ms` | `18.75 ms` / `16.20 ms` | `-4.73 ms` / `-2.90 ms` | | `card_idle_behind_ms` (avg / med) | `7.20 ms` / `7.20 ms` | `6.50 ms` / `6.10 ms` | `-0.70 ms` / `-1.10 ms` | | Process `working_set_mb` (max) | `19,650 MB` | `19,388 MB` | `-262 MB` | | Process `private_commit_mb` (med / max) | `20,686 MB` / `21,189 MB` | `20,510 MB` / `20,895 MB` | `-176 MB` / `-294 MB` | | `SharedPool` footprint | `209 * 16 MiB = 3,344 MiB` | `676 live * 4 MiB = 2,704 MiB` (`121` trimmed: `797 -> 676`) | `-640 MiB` | ### 4K DLSS Quality (90s world window) | Metric | `main` (`89a194b`) | PR (`feat/dynamic-buffer-pools-and-shadow-reclaim`) | Delta | |---|---:|---:|---:| | `preparing` (report) | `20.25 ms` | `18.1 ms` | `-2.15 ms` (`-10.6%`) | | `preparing_core_ms` (avg / med) | `33.93 ms` / `35.80 ms` | `27.66 ms` / `29.60 ms` | `-6.27 ms` / `-6.20 ms` (`-17.3%`) | | `thin_ms` (avg / med) | `623.58 ms` / `716.60 ms` | `519.86 ms` / `627.80 ms` | `-103.72 ms` / `-88.80 ms` | | `mapped()` stall rate | `10.61 ms/s` | `1.44 ms/s` | `-86.4%` | | Process `working_set_mb` (avg / med / max) | `17,499` / `19,694` / `20,284 MB` | `16,609` / `19,363` / `19,841 MB` | `-890` / `-331` / `-443 MB` | | Process `private_commit_mb` (avg / med) | `19,780` / `21,478 MB` | `19,000` / `21,212 MB` | `-780` / `-266 MB` | | Shared VRAM `shared_mb` (avg / med / max) | `4,920` / `5,614` / `5,775 MB` | `4,482` / `5,354` / `5,578 MB` | `-438` / `-260` / `-197 MB` | | Dedicated VRAM `dedicated_mb` (avg) | `5,691 MB` | `5,448 MB` | `-243 MB` | | `final_waiting` | `12,470` | `11,203` | `-1,267` | | `SharedPool` footprint | `229 * 16 MiB = 3,664 MiB` | `796 live * 4 MiB = 3,184 MiB` (`110` trimmed: `906 -> 796`) | `-480 MiB` | | Median FPS / frame time | `6.4 fps` (`155.95 ms`) | `6.3 fps` (`157.8 ms`) | GPU-bound variance (`-0.1 fps`) |
Androtim commented 2026-12-02 10:04:14 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T10:04:14Z.


Automated triage for the maintainers (not an approval).

Verdict: needs-gpu-test · CI (check): passing

Review Summary

Logic, memory safety, and concurrency look solid, and CI is passing. Because this PR modifies D3D12 placed-heap lifetimes, VRAM budget thresholds, staging buffer allocation paths, and thin-list reclamation in victory-gpu, it warrants a local real-GPU smoke test before merging.

What was verified

  • crates/victory-gpu/src/ahead.rs:
    • Shrinking SharedBlock to 64 slots (4 MiB, single u64 bitmask) keeps SHARED_MAX == SHARED_BLOCK, and range_mask/find_run handle edge cases (n == 0, n == 64, start >= 64) without shift overflow.
    • Splitting SHARED_SMALL_POOL (slots == 1) and SHARED_LARGE_POOL (slots > 1) with SharedReclaim.large routes COM private-data release back to the originating pool without nested lock ordering issues (note_pool_progress() -> live_shared_heaps() runs outside pool locks).
    • ahead_limits() and card_trim_len() honor explicit VICTORY_BUFFERS_AHEAD, scale defaults down on < 12 GiB VRAM budgets, and guard card_room with card_trim_len(1, budget, used) > 0 to prevent allocate/trim oscillation.
  • crates/victory-gpu/src/shadow.rs:
    • lookup(), by_address(), and loose() allocate CPU-side staging via host.shared_buffer_staging(...) when card-backed, with OOM rollback of CARD_BYTES[0] / WINDOW_CARD_BYTES if staging allocation fails.
    • Promoting BY_ADDRESS_USED to a module static and tracking vram_counted / by_address_vram on Card fixes leaked by_address budget accounting and stops RAM fallbacks from inflating WINDOW_CARD_BYTES; #[cfg(test)] Shadow::unbacked and land_tests initialize both flags to false.
    • let_go_idle() prunes dead Weak<Shadow> entries from CARDED.
  • crates/victory-gpu/src/list/thin.rs:
    • drop_untranslated_uploads() runs on unflushed Front::words in Front::leave() and unpopped inner.chunks in Recording::drop() (not inner.kept), avoiding double-free of Box<Upload>.
    • BACKS_CAP = 256 bounds retained closed backing lists and calls crate::object::release_boxed::<List> after dropping the BACKS lock.

Minor observations for GPU verification

  • REST_MS in ahead.rs drops from 2500 ms to 500 ms (SHARED_SPARES_NORMAL from 2 to 1): verify under sustained low-FPS / heavy streaming workloads (e.g., 4K) that recycled 4 MiB shared heap slots show no visual corruption or DRED/device-removed faults.
  • In thin.rs, if a recording is abandoned mid-translate, the in-progress chunk is still moved to inner.kept, so any remaining untranslated UPLOAD ops in that single chunk are not reclaimed by Recording::drop() (safe and non-regressing vs main, just a minor remaining edge case).

Next step

Run a local real-GPU smoke test covering both VRAM-pressured (< 12 GiB or high-res) and steady-state streaming scenes to verify no DRED faults, visual regressions, or SharedPool / by_address VRAM accounting regressions.


Generated with Antigravity CLI (agy).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7341913684 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/322#issuecomment-7341913684). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-02T10:04:14Z. --- <!-- minivi-triage v1 head=53b723cfd4d59bb15cfa36ce7395ba163021b410 verdict=needs-gpu-test ci=passing at=2026-12-02T10:04:46Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-gpu-test` · **CI (`check`):** `passing` ### Review Summary Logic, memory safety, and concurrency look solid, and CI is passing. Because this PR modifies D3D12 placed-heap lifetimes, VRAM budget thresholds, staging buffer allocation paths, and thin-list reclamation in `victory-gpu`, it warrants a local real-GPU smoke test before merging. ### What was verified - **`crates/victory-gpu/src/ahead.rs`**: - Shrinking `SharedBlock` to 64 slots (`4 MiB`, single `u64` bitmask) keeps `SHARED_MAX == SHARED_BLOCK`, and `range_mask`/`find_run` handle edge cases (`n == 0`, `n == 64`, `start >= 64`) without shift overflow. - Splitting `SHARED_SMALL_POOL` (`slots == 1`) and `SHARED_LARGE_POOL` (`slots > 1`) with `SharedReclaim.large` routes COM private-data release back to the originating pool without nested lock ordering issues (`note_pool_progress()` -> `live_shared_heaps()` runs outside pool locks). - `ahead_limits()` and `card_trim_len()` honor explicit `VICTORY_BUFFERS_AHEAD`, scale defaults down on `< 12 GiB` VRAM budgets, and guard `card_room` with `card_trim_len(1, budget, used) > 0` to prevent allocate/trim oscillation. - **`crates/victory-gpu/src/shadow.rs`**: - `lookup()`, `by_address()`, and `loose()` allocate CPU-side staging via `host.shared_buffer_staging(...)` when card-backed, with OOM rollback of `CARD_BYTES[0]` / `WINDOW_CARD_BYTES` if staging allocation fails. - Promoting `BY_ADDRESS_USED` to a module static and tracking `vram_counted` / `by_address_vram` on `Card` fixes leaked `by_address` budget accounting and stops RAM fallbacks from inflating `WINDOW_CARD_BYTES`; `#[cfg(test)]` `Shadow::unbacked` and `land_tests` initialize both flags to `false`. - `let_go_idle()` prunes dead `Weak<Shadow>` entries from `CARDED`. - **`crates/victory-gpu/src/list/thin.rs`**: - `drop_untranslated_uploads()` runs on unflushed `Front::words` in `Front::leave()` and unpopped `inner.chunks` in `Recording::drop()` (not `inner.kept`), avoiding double-free of `Box<Upload>`. - `BACKS_CAP = 256` bounds retained closed backing lists and calls `crate::object::release_boxed::<List>` after dropping the `BACKS` lock. ### Minor observations for GPU verification - `REST_MS` in `ahead.rs` drops from `2500 ms` to `500 ms` (`SHARED_SPARES_NORMAL` from `2` to `1`): verify under sustained low-FPS / heavy streaming workloads (e.g., 4K) that recycled 4 MiB shared heap slots show no visual corruption or DRED/device-removed faults. - In `thin.rs`, if a recording is abandoned mid-`translate`, the in-progress chunk is still moved to `inner.kept`, so any remaining untranslated `UPLOAD` ops in that single chunk are not reclaimed by `Recording::drop()` (safe and non-regressing vs `main`, just a minor remaining edge case). ### Next step Run a local real-GPU smoke test covering both VRAM-pressured (`< 12 GiB` or high-res) and steady-state streaming scenes to verify no DRED faults, visual regressions, or `SharedPool` / `by_address` VRAM accounting regressions. --- _Generated with Antigravity CLI (`agy`)._
Androtim commented 2026-12-02 10:19:03 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T10:19:03Z.


Autonomous architectural audit PASSED on 53b723cf (CI GREEN):

  • Code review: Clean, default-on budget-reactive architectural replacement (zero new opt-in switches):
    • ahead.rs: dynamic < 12 GiB vs >= 12 GiB CARD pool limits + pressure-reactive card_trim_len, 4 MiB split SHARED_SMALL_POOL / SHARED_LARGE_POOL (u64 bitmask, REST_MS=500, SharedReclaim.large routing).
    • shadow.rs: CPU-only shared_buffer_staging when card-backed (with OOM counter rollback), accurate vram_counted / by_address_vram accounting on Drop, and dead Weak pruning in CARDED.
    • list/thin.rs: immediate drop_untranslated_uploads reclamation in Front::leave() & Recording::drop(), plus BACKS_CAP = 256 released outside the lock.
  • Plain --release A/B (0 crashes / 0 DRED):
    • 1440p 90s: 14.8 -> 15.2 fps (+0.4 fps / -1.8 ms), VRAM used_max -150 MB, room_false 5.6% -> 0.0%, pool_not_made 88 -> 0, final_waiting 3,421 -> 2,268 (-33.7%), mapped() stall rate -80.8% (7.95 -> 1.53 ms/s), SharedPool -640 MiB, private_commit -294 MB max.
    • 4K 90s: preparing 20.25 -> 18.1 ms (-10.6%), preparing_core_ms -6.27 ms (-17.3%), thin_ms -103.7 ms, mapped() -86.4% (10.61 -> 1.44 ms/s), working_set -890 MB avg, private_commit -780 MB avg, shared_mb -438 MB avg, final_waiting -1,267, SharedPool -480 MiB.
  • Diagnostics (1440p 90s): All 6 gates PASS (luma=100.0, near_black=0.07%, edge_energy=7.89, magenta=0.0%, final_waiting=2,588, mapped_rate=1.05 ms/s).

Squash-merging into main.

<!-- greyfinch-sync:Androtim/MiniVI:comment:7342290484 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/322#issuecomment-7342290484). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-02T10:19:03Z. --- Autonomous architectural audit **PASSED** on `53b723cf` (CI GREEN): - **Code review:** Clean, default-on budget-reactive architectural replacement (zero new opt-in switches): - `ahead.rs`: dynamic `< 12 GiB` vs `>= 12 GiB` `CARD` pool limits + pressure-reactive `card_trim_len`, 4 MiB split `SHARED_SMALL_POOL` / `SHARED_LARGE_POOL` (`u64` bitmask, `REST_MS=500`, `SharedReclaim.large` routing). - `shadow.rs`: CPU-only `shared_buffer_staging` when card-backed (with OOM counter rollback), accurate `vram_counted` / `by_address_vram` accounting on `Drop`, and dead `Weak` pruning in `CARDED`. - `list/thin.rs`: immediate `drop_untranslated_uploads` reclamation in `Front::leave()` & `Recording::drop()`, plus `BACKS_CAP = 256` released outside the lock. - **Plain `--release` A/B (`0` crashes / `0` DRED):** - **1440p 90s:** `14.8 -> 15.2 fps` (`+0.4 fps` / `-1.8 ms`), `VRAM used_max -150 MB`, `room_false 5.6% -> 0.0%`, `pool_not_made 88 -> 0`, `final_waiting 3,421 -> 2,268` (`-33.7%`), `mapped()` stall rate `-80.8%` (`7.95 -> 1.53 ms/s`), `SharedPool -640 MiB`, `private_commit -294 MB` max. - **4K 90s:** `preparing 20.25 -> 18.1 ms` (`-10.6%`), `preparing_core_ms -6.27 ms` (`-17.3%`), `thin_ms -103.7 ms`, `mapped()` `-86.4%` (`10.61 -> 1.44 ms/s`), `working_set -890 MB` avg, `private_commit -780 MB` avg, `shared_mb -438 MB` avg, `final_waiting -1,267`, `SharedPool -480 MiB`. - **Diagnostics (`1440p` 90s):** All 6 gates PASS (`luma=100.0`, `near_black=0.07%`, `edge_energy=7.89`, `magenta=0.0%`, `final_waiting=2,588`, `mapped_rate=1.05 ms/s`). Squash-merging into `main`.
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!322
No description provided.