From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Linus Torvalds <torvalds@osdl.org>
Cc: David Howells <dhowells@redhat.com>,
Andrew Morton <akpm@osdl.org>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Document Linux's memory barriers [try #5]
Date: Fri, 17 Mar 2006 12:20:39 +1100 [thread overview]
Message-ID: <441A0EE7.60809@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0603160914410.3618@g5.osdl.org>
Linus Torvalds wrote:
> Well, the argument I have against mentioning caches is that cache
> coherency order is _not_ the only thing that is relevant. As already
> mentioned, data speculation can cause exactly the same "non-causal" effect
> as cache update ordering, so from a _conceptual_ standpoint, the cache is
> really just one implementation detail in the much bigger picture of
> buffering and speculative work re-ordering operations...
>
Agreed. I wonder how you can best illustrate the theoretical machine
model (from a programmer's point of view). I guess each consistency
domain has an horizon (barrier, but I'm trying to avoid that word in
this context) over which memory barriers will provide some partial
ordering on transactions going to and/or from the horizon.
+---+ : |c
|CPU|---:---|a m
+---+ : |c e
: |h m
+---+ : |e o
|CPU|---:---|d r
+---+ : | y
I guess you could think of a smp_wmb() in this case being a wall that
moves out from the CPU along with other memory stores, and stops them
from passing (the problem with a "wall" is that it doesn't easily apply
to a full smp_mb() unless you have loads travelling the same way, which
has its own intuitiveness problems).
> So it might be a good idea to first explain the memory barriers in a more
> abstract sense without talking about what exactly goes on, and then have
> the section that gives _examples_ of what the CPU actually is doing that
> causes these barriers to be needed. And make it clear that the examples
> are just that - examples.
>
Yeah that would be nice. The abstract explanation will be tricky. Maybe
it isn't so critical to be easily understandable if it is backed by
examples.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2006-03-17 1:20 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 20:29 [PATCH] Document Linux's memory barriers [try #4] David Howells
2006-03-09 23:34 ` Paul Mackerras
2006-03-09 23:45 ` Michael Buesch
2006-03-09 23:56 ` Linus Torvalds
2006-03-10 0:07 ` Michael Buesch
2006-03-10 0:48 ` Alan Cox
2006-03-10 0:54 ` Paul Mackerras
2006-03-10 15:19 ` David Howells
2006-03-11 0:01 ` Paul Mackerras
2006-03-10 5:28 ` Nick Piggin
2006-03-15 11:10 ` David Howells
2006-03-15 11:51 ` Nick Piggin
2006-03-15 13:47 ` David Howells
2006-03-15 23:21 ` Nick Piggin
2006-03-12 17:15 ` Eric W. Biederman
2006-03-14 21:26 ` David Howells
2006-03-14 21:48 ` Paul Mackerras
2006-03-14 23:59 ` David Howells
2006-03-15 0:20 ` Linus Torvalds
2006-03-15 1:19 ` David Howells
2006-03-15 1:47 ` Linus Torvalds
2006-03-15 1:25 ` Nick Piggin
2006-03-15 0:54 ` Paul Mackerras
2006-03-13 12:32 ` Sergei Organov
2006-03-14 20:31 ` David Howells
2006-03-14 21:11 ` linux-os (Dick Johnson)
2006-03-15 9:09 ` Sergei Organov
2006-03-15 9:04 ` Sergei Organov
2006-03-14 20:35 ` David Howells
2006-03-15 9:11 ` Sergei Organov
2006-03-15 14:23 ` [PATCH] Document Linux's memory barriers [try #5] David Howells
[not found] ` <20060315200956.4a9e2cb3.akpm@osdl.org>
2006-03-16 11:50 ` David Howells
2006-03-16 17:18 ` Linus Torvalds
2006-03-17 1:20 ` Nick Piggin [this message]
2006-03-16 23:17 ` Paul E. McKenney
2006-03-16 23:55 ` Linus Torvalds
2006-03-17 1:29 ` Paul E. McKenney
2006-03-17 5:32 ` Linus Torvalds
2006-03-17 6:23 ` Paul E. McKenney
2006-03-23 18:34 ` David Howells
2006-03-23 19:28 ` Linus Torvalds
2006-03-23 22:26 ` Paul E. McKenney
-- strict thread matches above, loose matches on Subject: below --
2006-03-28 22:25 Suzanne Wood
2006-03-29 17:54 ` David Howells
2006-03-29 20:51 Suzanne Wood
2006-03-30 20:18 ` David Howells
2006-03-31 0:55 Suzanne Wood
2006-03-31 14:51 ` David Howells
2006-03-31 16:16 Suzanne Wood
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=441A0EE7.60809@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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