gpu: avoid unrelated range-lock wakeups and linear overlap scans #3292
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3292
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3292"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@spk-c on GitHub · 2026-11-29 21:22 UTC · original
spk-c:perf/range-lock-overlap→main· +27 −6 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCWhat it changes
The watch range lock stores writer ranges sorted and merged, but checks them linearly while holding the state mutex. Reader drops also wake all waiters even when the departing reader is outside the writer's ranges.
Use binary search over the joined intervals and notify waiters only when the departing reader overlaps the pending writer. Writer release still notifies all. Lock ownership and ordering are unchanged.
How it was tested
cargo testpassed for the crates it touches: no, not yet run. Added a predicate-equivalence regression test; existing concurrency tests retained.victory-loader::unwind_copyis unused, outside the changed file. No successful test run is claimed.cargo test -p victory-gpu rangelock --lockedand identical streaming-route A/B, comparing CPU preparation time, p95/p99 and displayed FPS.Checked for overlap
AI assistance
Prepared with AI assistance; gameplay validation and human review remain pending.