From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: benh <benh@kernel.crashing.org>, davem <davem@davemloft.net>,
"H. Peter Anvin" <hpa@zytor.com>,
Linux-Arch <linux-arch@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, dhowells <dhowells@redhat.com>
Subject: on memory barriers and cachelines
Date: Wed, 01 Feb 2012 10:33:58 +0100 [thread overview]
Message-ID: <1328088838.2760.21.camel@laptop> (raw)
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?
next reply other threads:[~2012-02-01 9:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 9:33 Peter Zijlstra [this message]
2012-02-01 14:22 ` on memory barriers and cachelines 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1328088838.2760.21.camel@laptop \
--to=peterz@infradead.org \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).