On Wed, Feb 01, 2012 at 10:33:58AM +0100, Peter Zijlstra wrote: > Hi all, > > So I was talking to Paul yesterday and he mentioned how the SRCU sync > primitive has to use extra synchronize_sched() calls in order to avoid > smp_rmb() calls in the srcu_read_{un,}lock() calls. > > Now memory barriers are usually explained as observable order between > two (or more) unrelated variables, as Documentation/memory-barriers.txt > does in great detail. > > What I couldn't find in there though, is what happens when both > variables are on the same cacheline. The "The effects of the CPU cache" > and "Cache coherency" sections are closest but leave me wanting on this > point. > > Can we get some implicit behaviour from being on the same cacheline? Or > can this memory access queue still totally wreck the game? I don't know of any guarantees in this area, but am checking with hardware architects for a couple of architectures. Thanx, Paul -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html