←back to thread

257 points tosh | 1 comments | | HN request time: 0s | source
Show context
cperciva ◴[] No.42069585[source]
We use atomic operations to update the pointers in a thread-safe manner

Are you sure about that? Atomics are not locks, and not all systems have strong memory ordering.

replies(3): >>42070126 #>>42070474 #>>42070917 #
jpc0 ◴[] No.42070126[source]
> ... update the pointers ...

Pretty sure ARM and x86 you would be seeing on AWS does have strong memory ordering, and has atomic operations that operate on something the size of a single register...

replies(1): >>42070251 #
1. cperciva ◴[] No.42070251[source]
Graviton has weaker memory ordering than amd64. I know this because FreeBSD had a ring buffer which was buggy on Graviton...