News for hackers. Stuff that matters.
Re:Seqlock-Based Atomic Memory Snapshots by bonzini on Saturday August 26, 2023 @02:37PM (#37275602)
Indeed the load/load fence must be before the "final long currentVersion" load—which in turn can be a relaxed load—not after the first load.

On x86 this produces optimal code because the load/load fence does not need to be compiled into a processor instruction (LFENCE and SFENCE exist but are only used in very special cases; they aren't needed for normal memory and normal load instructions).

There are no comments on this comment yet.