perf(gpu): unblock list::thin and dynamic descriptor slot gating (127–141 lists/frame held back) #232

Closed
opened 2026-12-01 20:21:00 +00:00 by github-bot · 2 comments
Owner

@⁠Androtim on GitHub · 2026-11-30 10:17 UTC · original

Measured on RTX 4060 Ti 8 GB (Series X 1440p -PlayParity, warm shader cache, <playtest-log>):

  • Overall frame: 4.8–5.75 fps (173.6–206.3 ms/frame) while GPU takes only 2.2–5.0 ms/frame.
  • victory_gpu::list::thin: 127.0–140.6 lists/frame held back waiting for dynamic descriptor slots (8,642.4–9,417.8 ms cumulative wait; 104–134 submitted lists not translated yet).
  • victory_gpu::copystat: 71,760–73,478 list calls/frame spending 833.2–897.0 ms across all recording threads; 25,084–25,659 dynamic descriptor table asks (19.7–23.0 ms searching).
  • Submitting thread 29148: idle 78.3–106.8 ms/frame between submissions (20.2–20.5 submissions/frame).

Proposed Direction

  • Replace contended global dynamic-descriptor slot gating with a lock-free per-frame ring-buffered descriptor allocator / larger per-thread heap slices.
  • Remove lock contention on hot list recording paths (list::thin).

Related to #170.

**@⁠Androtim** on GitHub · 2026-11-30 10:17 UTC · [original](https://github.com/Androtim/MiniVI/issues/232) Measured on RTX 4060 Ti 8 GB (Series X 1440p `-PlayParity`, warm shader cache, `<playtest-log>`): - Overall frame: `4.8–5.75 fps` (`173.6–206.3 ms/frame`) while GPU takes only `2.2–5.0 ms/frame`. - `victory_gpu::list::thin`: `127.0–140.6` lists/frame held back waiting for dynamic descriptor slots (`8,642.4–9,417.8 ms` cumulative wait; `104–134` submitted lists not translated yet). - `victory_gpu::copystat`: `71,760–73,478` list calls/frame spending `833.2–897.0 ms` across all recording threads; `25,084–25,659` dynamic descriptor table asks (`19.7–23.0 ms` searching). - Submitting thread `29148`: idle `78.3–106.8 ms/frame` between submissions (`20.2–20.5` submissions/frame). ### Proposed Direction - Replace contended global dynamic-descriptor slot gating with a lock-free per-frame ring-buffered descriptor allocator / larger per-thread heap slices. - Remove lock contention on hot list recording paths (`list::thin`). Related to #170.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:21:00 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 17:09 UTC · original · edited 2026-12-02 12:06 UTC

Confirmed on current main — none of the open PRs (#300, #302, #310, #311, #314, #327) modify list::thin or dynamic descriptor slot gating/allocation.

Verified on Current main

  • Dynamic-slot gating & parking (thin.rs):
    • gated(first, free, all, pending) (thin.rs#L303-L308) holds back non-first recordings whenever free < all / 4 || (pending && free < all / 8 * 5).
    • Recording::held_back (thin.rs#L381-L393) queries crate::descriptor::host::dynamic_room() before each chunk in Recording::run (thin.rs#L497-L501) and parks held-back recordings via Recording::park (thin.rs#L396-L404) with a HELD_BACK_MOST_US = 250_000 (250 ms) cap, waking workers on a 1 ms wait_timeout when PARKED_N > 0 (thin.rs#L639-L642).
  • Contended global dynamic descriptor allocator (host.rs):
  • Global mutexes on list::thin paths (thin.rs):
    • Recording and translation still contend on global mutexes LIVE, WORDS, READY, PARKED, and BACKS (thin.rs#L250-L266).

Automated triage generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-30 17:09 UTC · [original](https://github.com/Androtim/MiniVI/issues/232#issuecomment-7285798191) · edited 2026-12-02 12:06 UTC <!-- minivi-triage v1 updated=2026-12-02T11:06:22Z verdict=confirmed at=2026-12-02T12:07:23Z --> Confirmed on current `main` — none of the open PRs (#300, #302, #310, #311, #314, #327) modify `list::thin` or dynamic descriptor slot gating/allocation. ### Verified on Current `main` - **Dynamic-slot gating & parking ([`thin.rs`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/list/thin.rs)):** - `gated(first, free, all, pending)` ([`thin.rs#L303-L308`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/list/thin.rs#L303-L308)) holds back non-`first` recordings whenever `free < all / 4 || (pending && free < all / 8 * 5)`. - `Recording::held_back` ([`thin.rs#L381-L393`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/list/thin.rs#L381-L393)) queries `crate::descriptor::host::dynamic_room()` before each chunk in `Recording::run` ([`thin.rs#L497-L501`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/list/thin.rs#L497-L501)) and parks held-back recordings via `Recording::park` ([`thin.rs#L396-L404`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/list/thin.rs#L396-L404)) with a `HELD_BACK_MOST_US = 250_000` (250 ms) cap, waking workers on a 1 ms `wait_timeout` when `PARKED_N > 0` ([`thin.rs#L639-L642`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/list/thin.rs#L639-L642)). - **Contended global dynamic descriptor allocator ([`host.rs`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/descriptor/host.rs)):** - `HostHeap::dynamic` ([`host.rs#L2726-L2766`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/descriptor/host.rs#L2726-L2766)) acquires `self.next: Mutex<DynamicPool>` ([`host.rs#L318`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/descriptor/host.rs#L318)) on every table allocation, scanning the bitset in `DynamicPool::alloc` ([`host.rs#L244-L257`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/descriptor/host.rs#L244-L257)) and updating `DYNAMIC_FREE` ([`host.rs#L2352-L2363`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/descriptor/host.rs#L2352-L2363)). - **Global mutexes on `list::thin` paths ([`thin.rs`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/list/thin.rs)):** - Recording and translation still contend on global mutexes `LIVE`, `WORDS`, `READY`, `PARKED`, and `BACKS` ([`thin.rs#L250-L266`](file:///C:/Users/Androtim/Documents/My%20Games/CopGame/minivi-triage/repo-main/crates/victory-gpu/src/list/thin.rs#L250-L266)). --- _Automated triage generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-12-02 14:17 UTC · original

Closing as superseded by #276 and active PRs (#331).

**@⁠Androtim** on GitHub · 2026-12-02 14:17 UTC · [original](https://github.com/Androtim/MiniVI/issues/232#issuecomment-7348313396) Closing as superseded by #276 and active PRs (#331).
This discussion has been locked. Commenting is limited to contributors.
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#232
No description provided.