Preemption Is GC for Memory Reordering
https://www.pvk.ca/Blog/2019/01/09/preemption-is-gc-for-memory-reordering/ [www.pvk.ca]
2019-01-11 06:03
Interrupt processing (returning from an interrupt handler, actually) is fully serialising on x86, and on other platforms, no doubt: any userspace instruction either fully executes before the interrupt, or is (re-)executed from scratch some time after the return back to userspace. That’s something we can abuse to guarantee ordering between memory accesses, without explicit barriers.
And then it gets crazy.
source: HN