perf(victory-gpu): lock-free fence fast path and signal events outside waiters mutex #415
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!415
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-415"
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?
@Lewandox on GitHub · 2026-11-26 17:58 UTC · original
Lewandox:perf/fence-lockfree-fastpath-and-unlock-signal→main· +72 −13 · 1 files · 1 commits · closed without mergingSummary
Reduces
Fence::waitersmutex contention and avoids holding the lock across Win32SetEventcalls (third_party/victory/crates/victory-gpu/src/fence.rs):set_event_on_completion:fence.value.load(Ordering::Acquire) >= valuebefore acquiringfence.waiters.lock(), avoiding mutex acquisition altogether for already-completed fence values (and drops the mutex before callingset_eventwhen the re-check under the lock observes completion).fence.waitersmutex inset():fence.valueand extracts reached waiters underfence.waiters.lock()(with zero heap allocation whenwaitersis empty), releases the mutex, and callsSetEventoutside the lock so concurrent callers do not block on kernel event signaling.concurrent_wait_and_signal_never_loses_a_wakeupracing 128set_event_on_completionregistrations against concurrentsetsignals to verify zero lost wakeups.Verification
cargo test -p victory-gpu --lib fence::tests(default and--features diagnostics)cargo xtask policyinsidethird_party/victory@Lewandox on GitHub · 2026-11-26 18:28 UTC · original
Closing as duplicate: already included in #411.
Pull request closed