Re:Lock-free Data Structures Part 1 – Introduction
by colanderman on Tuesday May 06, 2014 @04:07PM
(#7706778)
Jacques said "consistency", not "coherency"… those are different things.
Yes, most processors provide a coherent cache – individual writes are guaranteed to be eventually seen by all cores. However, most modern processors do not provide a consistent cache (for performance's sake): the order that unrelated writes become visible is not guaranteed.
Memory fences (which are not flushes or invalidates; neither implies the other!) instruct the CPU to provide such ordering.
Yes, most processors provide a coherent cache – individual writes are guaranteed to be eventually seen by all cores. However, most modern processors do not provide a consistent cache (for performance's sake): the order that unrelated writes become visible is not guaranteed.
Memory fences (which are not flushes or invalidates; neither implies the other!) instruct the CPU to provide such ordering.