We need these fences to ensure that other threads attempting to read
bytes in the buffer will see thw writes committed before the extents are
updated. Without these, the writes can be un-committed by the time the
buffer extents counter is updated -- the fences should ensure that the
records written into the log have completed by the time we observe the
buffer extents from different threads.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
What is the point of this change? The atomic_fetch_add operations already use memory_order_acq_rel, so the explicit fences are redundant.
Comment Actions
Agreed, these are all redundant. Ideally the compiler just eliminates the fences, and your change was a no-op :-)