fix(host): isolate unlocked relay_wait telemetry and fix settle_unlocked races under submit-split #3103
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!3103
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3103"
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?
@qlfu on GitHub · 2026-11-29 20:02 UTC · original
qlfu:pr/fix-settle-unlocked-races→main· +216 −32 · 6 files · 1 commits · closed without mergingSummary
Fixes the remaining thread-safety and pacing races in
VICTORY_SETTLE_UNLOCKED=1(particularly when paired withVICTORY_SUBMIT_SPLIT=1):relay_wait_unlocked: unlockedsettle()/settle_now()calls wait on the relay without mutating submit-thread-owned telemetry globals (WORKING,CARD_CLOCK_US[2],SUBMISSION_US[1],READ_KIND,BLAMED).WHY_SYNClocking & trailingwait_sent(): synchronizesWHY_SYNCupdates and ensures unlocked settles callsend::wait_sent()before snapshottingline(), preventingPresent/ fence waits from observing stale pre-send flight lines whenVICTORY_SUBMIT_SPLIT=1is active.settle_for_sync_fence(): dedicated mid-submit()path for callers that already hold the submit path so fence settles do not deadlock or race.host.dynamic(...)retries: falls back safely when an unlocked dynamic buffer check retries.Verification
cargo +1.98.1-x86_64-pc-windows-msvc clippy -p victory-gpu --lib --tests --no-deps --locked: 0 new warnings.cargo +1.98.1-x86_64-pc-windows-msvc test -p victory-gpu --lib --locked -- settle_unlocked --test-threads=1:2/2passed (settle_unlocked+relay_wait_unlocked).VICTORY_SUBMIT_SPLIT=1,0 WARNs / 0 ERRORs):SU=0vsSU=1):Submit: all33.60 -> 29.35 ms(-4.25 ms), FPS20.85/21.95 -> 21.30/22.82(max42.2),GPU busy 96.0% -> 97.0%,GPU idle 1.9 -> 1.5 ms.SU=0vsSU=1):ahead_lock 0.90 -> 0.50 ms,present_wait 4.7 -> 3.4 ms, FPS21.20/22.77 -> 21.90/23.56(p10 16.2 -> 19.0),0 WARNs / 0 ERRORs.@ghptc on GitHub · 2026-11-30 03:58 UTC · original
Thanks, @qlfu. The unlocked wait path in this PR already covers a case we reproduced through
land_before_remap. It can run concurrently with submission even whenVICTORY_SETTLE_UNLOCKEDis off. If submitter A is working when remap thread B entersrelay_wait, B can clear the shared work marker and then restore its savedtrueafter A has finished. This undercounts A's work during the wait and attributes work after A has stopped. With the phase observer in #3649, the restore can also make B the recorded owner.The synthetic regression starts an observed empty interval and A's work at tick 10, enters B's wait at 20, ends A's work at 35 and returns from B's wait at 40. At the tick-50 report there are 25 ticks of submit work and 15 outside submit work, with the work clock idle. The paired relay test covers pause and restore when the caller does hold the submission lock.
The focused follow-up cross-compiled in MSVC release mode. Both relay tests and the submit sub-bin test passed under Proton without a GPU. The follow-up changes work-clock ownership and gap attribution. The existing
stoodaccounting, other wait counters, landing predicate, ordering and fences remain as they were. The tests cover attribution and provide no FPS estimate.Pull request closed