fix(gpu): reclaim overflow thin backing lists and return warm HostLists (#276, #282) #371

Manually merged
github merged 1 commit from github-bot/gh-371 into gh-pr/371/base 2026-12-03 01:04:21 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-03 00:52 UTC · original
Androtim:fix/thin-hostlist-leak → main · +125 −17 · 3 files · 1 commits · merged 2026-12-03 01:00 UTC

Summary

Fixes thin backing-list HostList/VRAM leakage and premature backing-list destruction when BACKS overflows:

  • \crates/victory-gpu/src/list.rs:
    • Add
      eturn_idle_host(host: HostList)\ to reset unused/already-completed host command lists and return them to \IDLE\ (respecting \pools(), \idle_most(), and \IDLE_MOST.1\ byte caps).
    • Have non-thin \oxed()\ lists draw from \ resh_list()\ instead of always allocating fresh host command lists.
  • \crates/victory-gpu/src/list/thin.rs:
    • Add \Recording::return_back(&self)\ to return closed backing \List\ shells to \BACKS\ right after \jobs_of()\ detaches their \HostList\s, instead of pinning idle backing shells until the front list resets frames later.
    • Raise \BACKS_CAP\ from \256\ to \512\ and add
      eclaim_back\ /
      ecycle_back\ so overflow backing \List\ shells (
      efs == 0\ from \Box::into_raw) return any remaining \host\ and \earlier\ \HostList\s to \list::IDLE\ and drop cleanly via \Box::from_raw\ instead of underflow-bailing in \object::release_boxed.
    • Add unit test
      eturn_back_is_idempotent_and_reclaim_back_handles_refs_zero.
  • \crates/victory-gpu/src/queue/behind.rs:
    • Call
      .return_back()\ for unfolded
      ecordings\ immediately after \jobs_of(queue as This, &lists)\ extracts their backing \HostList\s.

Verification

  • \cargo +1.98.1-x86_64-pc-windows-gnu xtask policy\ (\342 files ok, --staged\ \3 files ok)
  • \cargo +1.98.1-x86_64-pc-windows-gnu check --workspace --all-targets\ (passed)

Refs #276, #282

**@⁠Androtim** on GitHub · 2026-12-03 00:52 UTC · [original](https://github.com/Androtim/MiniVI/pull/371) `Androtim:fix/thin-hostlist-leak` → `main` · +125 −17 · 3 files · 1 commits · merged 2026-12-03 01:00 UTC ## Summary Fixes thin backing-list HostList/VRAM leakage and premature backing-list destruction when BACKS overflows: - \crates/victory-gpu/src/list.rs\: - Add \ eturn_idle_host(host: HostList)\ to reset unused/already-completed host command lists and return them to \IDLE\ (respecting \pools()\, \idle_most()\, and \IDLE_MOST.1\ byte caps). - Have non-thin \oxed()\ lists draw from \ resh_list()\ instead of always allocating fresh host command lists. - \crates/victory-gpu/src/list/thin.rs\: - Add \Recording::return_back(&self)\ to return closed backing \List\ shells to \BACKS\ right after \jobs_of()\ detaches their \HostList\s, instead of pinning idle backing shells until the front list resets frames later. - Raise \BACKS_CAP\ from \256\ to \512\ and add \ eclaim_back\ / \ ecycle_back\ so overflow backing \List\ shells (\ efs == 0\ from \Box::into_raw\) return any remaining \host\ and \earlier\ \HostList\s to \list::IDLE\ and drop cleanly via \Box::from_raw\ instead of underflow-bailing in \object::release_boxed\. - Add unit test \ eturn_back_is_idempotent_and_reclaim_back_handles_refs_zero\. - \crates/victory-gpu/src/queue/behind.rs\: - Call \ .return_back()\ for unfolded \ ecordings\ immediately after \jobs_of(queue as This, &lists)\ extracts their backing \HostList\s. ## Verification - \cargo +1.98.1-x86_64-pc-windows-gnu xtask policy\ (\342 files ok\, \--staged\ \3 files ok\) - \cargo +1.98.1-x86_64-pc-windows-gnu check --workspace --all-targets\ (passed) Refs #276, #282
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 00:58:13 +00:00
github-bot changed target branch from main to gh-pr/371/base 2026-12-03 01:04:21 +00:00
github manually merged commit d2a0cee382 into gh-pr/371/base 2026-12-03 01:04:21 +00:00
Author
Owner

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

Deep Static Audit Pass #5 (#276 comment 7362570756) verified fix/thin-hostlist-leak (d2a0cee3) sound & race-free (Recording::return_back + Job::unfold early return + direct Box::from_raw in reclaim_back returning warm HostLists via return_idle_host, with unit test return_back_is_idempotent_and_reclaim_back_handles_refs_zero). CI 47006889289 is GREEN and has zero file overlap with #370 (16d546b8). Merging to main — once main CI finishes green on #370 + #371 (+ #357), v2026.12.03.01 will be ready to cut!

**@⁠Androtim** on GitHub · 2026-12-03 01:01 UTC · [original](https://github.com/Androtim/MiniVI/pull/371#issuecomment-7363857557) Deep Static Audit Pass #5 (`#276` comment `7362570756`) verified `fix/thin-hostlist-leak` (`d2a0cee3`) **sound & race-free** (`Recording::return_back` + `Job::unfold` early return + direct `Box::from_raw` in `reclaim_back` returning warm `HostList`s via `return_idle_host`, with unit test `return_back_is_idempotent_and_reclaim_back_handles_refs_zero`). CI `47006889289` is **GREEN** and has zero file overlap with `#370` (`16d546b8`). Merging to `main` — once `main` CI finishes green on `#370` + `#371` (+ `#357`), **`v2026.12.03.01`** will be ready to cut!
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!371
No description provided.