gpu(watch): spin-backoff before yielding in fault-ask open wait #2814
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!2814
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2814"
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?
@Nosheboo on GitHub · 2026-11-29 17:37 UTC · original
Nosheboo:perf/fault-ask-spin-backoff→main· +131 −30 · 1 files · 1 commits · merged 2026-11-29 22:54 UTCMotivation
On upstream
55d06914, baseline profiling shows the submitter spending3.4–3.7 ms/frameinwrite watch. Inwait_open_done, the open-wait loop immediately calledstd::thread::yield_now()on contention and unconditionally evaluatedInstant::now()even whenfault_asks()diagnostics were off.Changes
crates/victory-gpu/src/watch.rs:OpenWait,wait_open_done, and testablewait_open_done_with.std::hint::spin_loop()fast-spin phase (OPEN_FAST_SPINS = 8) before falling back tostd::thread::yield_now()up toOPEN_LONGEST_US = 2_000.Instant::now()reads inside thefault_asks()diagnostics branch so the non-diagnostic hot path avoids extra clock syscalls.wait_open_done_covers_immediate_fast_spin_yield_cleared_and_timeoutcovering all six wait outcomes.Verification
cargo test -p victory-gpu --lib --locked watch:: -- --test-threads=1->63 passed; 0 failed; 0 ignoredcargo clippy -p victory-gpu --no-deps --lib --tests --locked -- -W clippy::undocumented_unsafe_blocksreported 0 warnings inwatch.rsgit diff --cached --checkclean;cargo xtask policy --stagedpassed (1 files ok)Council review
Rounds: 3
gpt-6-luna,xhigh)gpt-6-luna,xhigh)gpt-6-luna,xhigh)Created in T3 Code (reviewed by Council: 3× gpt-6-luna on xhigh).