linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* on memory barriers and cachelines
@ 2012-02-01  9:33 Peter Zijlstra
  2012-02-01 14:22 ` Paul E. McKenney
  2012-02-01 17:17 ` Linus Torvalds
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Zijlstra @ 2012-02-01  9:33 UTC (permalink / raw)
  To: Linus Torvalds, Paul E. McKenney
  Cc: benh, davem, H. Peter Anvin, Linux-Arch, Ingo Molnar, dhowells

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?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-10 18:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-01  9:33 on memory barriers and cachelines Peter Zijlstra
2012-02-01 14:22 ` Paul E. McKenney
2012-02-10  2:51   ` Jamie Lokier
2012-02-10 16:32     ` Paul E. McKenney
2012-02-10 18:13       ` Peter Zijlstra
2012-02-10 18:47         ` Paul E. McKenney
2012-02-01 17:17 ` Linus Torvalds
2012-02-01 17:29   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).