perf(gpu/submit): always lock-free pre-filter unchanged refresh spans #390

Merged
Androtim merged 2 commits from upstream-pr/390 into main 2026-12-03 13:47:21 +00:00
Androtim commented 2026-12-03 12:59:04 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T12:59:04Z.


Summary

Eliminates the legacy \FEW = 32\ pre-filter bypass on the submit thread so large refresh batches (e.g. hundreds to thousands of buffer views per submission) always filter out provably unchanged spans lock-free before querying write-watches or waking worker chunks.

Changes

  • **\crates/victory-gpu/src/host.rs**:
    • Removed the \const FEW: usize = 32\ / \MANY_CHUNK\ bypass in \Batch::refresh_front\ and \Batch::flush_all\ (and pre-filtered \Batch::refresh_ahead) using shared \Batch::filter_unchanged\ and \Batch::ask_ahead_and_filter\ helpers.
    • Provably clean spans are dropped lock-free via \Shadow::nothing_new_with\ on the submitting thread before \sk_ahead\ and before \wide_each_scoped\ / \wide_run. When !kept, spans cleared by \sk_ahead\ are also re-filtered before dispatch; remaining genuinely dirty/uncertain spans dispatch at \wide_chunk()\ grain (and skip worker wakeups altogether when \
<!-- greyfinch-sync:Androtim/MiniVI:issue:5626978859 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/390). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-03T12:59:04Z. --- ## Summary Eliminates the legacy \FEW = 32\ pre-filter bypass on the submit thread so large refresh batches (e.g. hundreds to thousands of buffer views per submission) always filter out provably unchanged spans lock-free before querying write-watches or waking worker chunks. ### Changes - **\crates/victory-gpu/src/host.rs\**: - Removed the \const FEW: usize = 32\ / \MANY_CHUNK\ bypass in \Batch::refresh_front\ and \Batch::flush_all\ (and pre-filtered \Batch::refresh_ahead\) using shared \Batch::filter_unchanged\ and \Batch::ask_ahead_and_filter\ helpers. - Provably clean spans are dropped lock-free via \Shadow::nothing_new_with\ on the submitting thread before \sk_ahead\ and before \wide_each_scoped\ / \wide_run\. When \!kept\, spans cleared by \sk_ahead\ are also re-filtered before dispatch; remaining genuinely dirty/uncertain spans dispatch at \wide_chunk()\ grain (and skip worker wakeups altogether when \
Androtim commented 2026-12-03 13:33:13 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T13:33:13Z.


Triage (0b700caa, CI check PASS):

  • Gate 2 Reasoning Audit Pass #16 (#282 comment 7379381558): VERIFIED CLEAN (0 P0, 0 P1).
  • Holding auto-merge solely for Gate 3 plain --release A/B vs main (69d73a85) showing win/non-regression with 0 crashes/DRED. Ready to merge immediately once posted!
<!-- greyfinch-sync:Androtim/MiniVI:comment:7379990525 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/390#issuecomment-7379990525). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-03T13:33:13Z. --- Triage (`0b700caa`, **CI `check` PASS**): - **Gate 2 Reasoning Audit Pass #16 (`#282` comment `7379381558`):** `VERIFIED CLEAN (0 P0, 0 P1)`. - Holding auto-merge solely for **Gate 3 plain `--release` A/B** vs `main` (`69d73a85`) showing win/non-regression with `0` crashes/DRED. Ready to merge immediately once posted!
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!390
No description provided.