32 ms·
>Um... which platform? In practice all non-TSO machines that need a load-load barrier for acquire but no barrier for data dependencies (i.e. loads through poin
by gpderetta 3y ago
>Um... which platform?
In practice all non-TSO machines that need a load-load barrier for acquire but no barrier for data dependencies (i.e. loads through pointers). Notably this includes ARM and POWER. These architectures still needed relatively expensive fences on the release path.
On TSO machines (SPARC, x86 for example) acquire loads and release stores are free.
Alpha was the strange outlier that also needed a barrier for the dependent load path.
But acquire and release are such a sweet spot for programming that ARM (and apparently POWER) have since added cheap (although not free) acquire load/release stores.
Far from being a mess, the C++11 memory model (and acquire/release in particular) has been an unmitigated success that has allowed writing, discussing and proving the correctness of very practical lock free algorithms on real hardware while not resorting to the expensive SEQ-CST model. Also since it inception, all relevant architectures have formalized their memory model and made sure that they can implement acq/rel efficiently.