Skip to content

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

Draft
spk-c wants to merge 1 commit into
trustno1-coder:mainfrom
spk-c:perf/upload-reservation-backoff
Draft

spk-c wants to merge 1 commit into
trustno1-coder:mainfrom
spk-c:perf/upload-reservation-backoff

Conversation

@spk-c

@spk-c spk-c commented Nov 29, 2026 •

Copy link
Copy Markdown

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

AI assistance

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

@spk-c spk-c changed the title perf(gpu): coalesce concurrent failed low-memory window searches [pr-performance][memory] gpu: coalesce concurrent failed low-memory window searches Nov 29, 2026
@github-actions github-actions Bot added memory RAM or VRAM use, out of memory, leaks pr-performance Pull request: makes it faster or use less memory labels Nov 29, 2026
@github-actions github-actions Bot changed the title [pr-performance][memory] gpu: coalesce concurrent failed low-memory window searches gpu: coalesce concurrent failed low-memory window searches Nov 29, 2026
OGShotz added a commit to OGShotz/VIctory-Turing that referenced this pull request Nov 29, 2026
moritz-eckhard-nickel added a commit to moritz-eckhard-nickel/VIctory-NVIDIA that referenced this pull request Nov 30, 2026
…d low-memory window searches)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

memory RAM or VRAM use, out of memory, leaks pr-performance Pull request: makes it faster or use less memory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant