gpu: coalesce concurrent failed low-memory window searches #3293

Manually merged
github merged 1 commit from github-bot/gh-3293 into gh-pr/3293/base 2026-11-30 14:15:26 +00:00 AGit
Owner

@⁠spk-c on GitHub · 2026-11-29 21:22 UTC · original
spk-c:perf/upload-reservation-backoff → main · +54 −9 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC

What it changes

The one-second backoff in upload::reserve checks an atomic before VirtualAlloc2, so simultaneous requests can enter expensive searches of a full address window. The cooldown also starts before the potentially long failed search.

Serialize only the slow fallback search and start the cooldown when a failure completes. Early and pooled allocations remain outside the new mutex. Successful fallback searches may now queue behind one another; the trade-off needs measurement.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): Not yet tested in-game; planned on RTX 4090, Series X, with matching settings and RT-heavy streaming.
  • Before: concurrent fallback searches can bypass the cooldown; time spent in a failed call consumes the cooldown (source inspection).
  • After: concurrent failures are coalesced and the cooldown begins at completion (source inspection). FPS and frametimes not measured.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A.
  • cargo test passed for the crates it touches: no, not yet run. Added tests for a slow failed search and concurrent callers.
  • Windows CI: run 46311135502 stopped at Clippy because victory-loader::unwind_copy is unused, outside the changed file. No successful test run is claimed.
  • Planned: cargo test -p victory-gpu upload --locked, then compare low-window warnings, successful allocation latency, p95/p99 and worst frame time on the same streaming route.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #3271 addresses first-upload headroom; #3078 addresses oversized GPU uploads; #2723 and #2133 address XMem address-space placement. None of those changes upload.rs. No duplicate found in the searched results.

AI assistance

Prepared with AI assistance; gameplay validation and human review remain pending.

**@⁠spk-c** on GitHub · 2026-11-29 21:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3293) `spk-c:perf/upload-reservation-backoff` → `main` · +54 −9 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC ## What it changes The one-second backoff in `upload::reserve` checks an atomic before VirtualAlloc2, so simultaneous requests can enter expensive searches of a full address window. The cooldown also starts before the potentially long failed search. Serialize only the slow fallback search and start the cooldown when a failure completes. Early and pooled allocations remain outside the new mutex. Successful fallback searches may now queue behind one another; the trade-off needs measurement. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): Not yet tested in-game; planned on RTX 4090, Series X, with matching settings and RT-heavy streaming. - Before: concurrent fallback searches can bypass the cooldown; time spent in a failed call consumes the cooldown (source inspection). - After: concurrent failures are coalesced and the cooldown begins at completion (source inspection). FPS and frametimes not measured. - For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A. - `cargo test` passed for the crates it touches: no, not yet run. Added tests for a slow failed search and concurrent callers. - Windows CI: [run 46311135502](https://github.com/spk-c/VIctory-NVIDIA/actions/runs/46311135502) stopped at Clippy because `victory-loader::unwind_copy` is unused, outside the changed file. No successful test run is claimed. - Planned: `cargo test -p victory-gpu upload --locked`, then compare low-window warnings, successful allocation latency, p95/p99 and worst frame time on the same streaming route. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #3271 addresses first-upload headroom; #3078 addresses oversized GPU uploads; #2723 and #2133 address XMem address-space placement. None of those changes upload.rs. No duplicate found in the searched results. ## AI assistance Prepared with AI assistance; gameplay validation and human review remain pending.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 21:27:38 +00:00
github-bot changed target branch from main to gh-pr/3293/base 2026-11-30 14:15:25 +00:00
github manually merged commit 3ea547d182 into gh-pr/3293/base 2026-11-30 14:15:26 +00:00
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/trustno1-coder--VIctory-NVIDIA!3293
No description provided.