On Mon May 19 17:02:57 EDT 2014, devon.od...@gmail.com wrote: > So you seem to be worried that N processors in a tight loop of LOCK > XADD could have a single processor. This isn't a problem because > locked instructions have total order. Section 8.2.3.8: > > "The memory-ordering model ensures that all processors agree on a > single execution order of all locked instructions, including those > that are larger than 8 bytes or are not naturally aligned."
i don't think this solves any problems. given thread 0-n all executing LOCK instructions, here's a valid ordering: 0 1 2 n lock stall stall ... stall lock stall stall ... stall ... ... lock stall stall ... stall i'm not sure if the LOCK really changes the situation. any old exclusive cacheline access should do? the documentation appears not to cover this completely. - erik