bneradt opened a new pull request, #14054:
URL: https://github.com/apache/trafficserver/pull/14054

   The BRAVO shared mutex fast path relies on a store-then-load handshake:
   a reader claims its slot and then rechecks the read bias, while a
   writer clears the read bias and then scans the slots. That handshake
   only excludes the two sides when all four operations are sequentially
   consistent. With the relaxed and acquire/release ordering in use, even
   x86 can let the writer's slot scan run ahead of its read-bias store,
   so a reader can see the old read bias while the writer sees the slot
   free, and both enter the critical section. Reader unlock was also a
   relaxed store, so on weakly ordered CPUs the reader's protected reads
   were not guaranteed to finish before the writer proceeded. OCSP
   staples, host status, SSL cert lookup and connection tracking all use
   this lock.
   
   This patch makes the slot claim, read-bias recheck, revocation store
   and slot scan seq_cst, matching the upstream Go implementation this
   code was ported from. With all four in one total order, at least one
   side always sees the other's store: either the reader sees the
   cleared bias and falls back to the underlying lock, or the writer sees
   the claimed slot and waits for it. Reader unlock is now a release
   store that the writer's slot scan acquires, so the reader's protected
   reads complete before the writer goes on.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to