Skip to content

Improve push lock wakeup behavior under contention - #38

Open
wnsntgs wants to merge 1 commit into
Mathewnd:rewritefrom
wnsntgs:pushlock
Open

Improve push lock wakeup behavior under contention#38
wnsntgs wants to merge 1 commit into
Mathewnd:rewritefrom
wnsntgs:pushlock

Conversation

@wnsntgs

@wnsntgs wnsntgs commented Aug 8, 2026

Copy link
Copy Markdown

The current implementation doesn't record whether a waiter requested shared or exclusive ownership, so every release wakes only one waiter. As a result, shared waiters queued behind an exclusive owner are effectively serialized.

This change records waiter mode and wakes the waiter chain when the oldest waiter is shared, while preserving retry-after-wake semantics. Also removes hard coded push lock masks/alignment values.

Queued 4 reader case:

  • before: max-active=1, ~83 ms
  • after: max-active=4, ~21-22 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant