Here’s a great article on Read-Copy-Update that goes into the magic of Linux sys_membarrier and Windows FlushProcessWriteBuffers for not only lock-free but even atomic-free “highly asymmetric synchronization” as is needed for garbage collectors.
On Skylake the smart pointer copy constructor and assignment operator for my lock-free nonblocking garbage collector cost 3.5 cycles, vs 0.25 for naked pointers, and 20 for atomic reference-counted std::shared_ptr.
-
-
On Intel, the mutator doesn’t even need to use atomics. The question I haven’t answered yet is whether performance goes to hell on ARM or if those super expensive fences can be avoided.
-
So let me understand better: under your scheme, is it possible to move objects in memory (eg to compact all older generation objects together) by mutating the pointer? As for ARM, if you want to bruteforce-test an assumption, there's an ARM Linux machine at my desk you can use.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.