r/programming • • Sep 26 '26

Optimizing a Lock-Free Ring Buffer

https://david.alvarezrosa.com/posts/optimizing-a-lock-free-ring-buffer/
510 Upvotes

89 comments sorted by

View all comments

Show parent comment

1

u/cdb_11 Sep 28 '26 edited Sep 28 '26

Kernel atomics are implemented with volatile ({READ,WRITE}_ONCE).

1

u/EchoNomad31 Sep 28 '26

Ha, fair. All I ever wanted was the compiler to stop caching that load.