From: Nick Piggin <npiggin@suse.de>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Paul McKenney <paulmck@us.ibm.com>,
David Howells <dhowells@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@suse.de>
Subject: Re: [rfc][patch] i386: remove comment about barriers
Date: Sun, 30 Sep 2007 14:05:45 +0200 [thread overview]
Message-ID: <20070930120545.GB7697@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0709291200590.13643@alien.or.mcafeemobile.com>
On Sat, Sep 29, 2007 at 12:12:52PM -0700, Davide Libenzi wrote:
> On Sat, 29 Sep 2007, Nick Piggin wrote:
>
> > [ This is true for x86's sfence/lfence, but raises a question about Linux's
> > memory barriers. Does anybody expect that a sequence of smp_wmb and smp_rmb
> > would ever provide a full smp_mb barrier? I've always assumed no, but I
> > don't know if it is actually documented? ]
>
> No, that can't be. rmb+wmb can't be considered a full mb.
Oh I realise it doesn't work with current implementations (powerpc at
least also would be broken I think). And I've always assumed no... But
the question was just whether the Linux memory model requires it (it
theoretically could require that smp_rmb is sequentially ordered WRT
smp_wmb without actually sequentially ordering stores around itself).
> There was a
> recent discussion about this in the thread originated by peterz scalable
> rw_mutex patches.
OK, good to hear it has been discussed. I didn't see anything explicit
in the documentation about it. A lot of the literature often says that
"barrier instructions" have a sequential ordering, so it could be useful
to explicitly say this isn't the case for Linux for rmb vs wmb.
next prev parent reply other threads:[~2007-09-30 12:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-29 13:28 Nick Piggin
2007-09-29 16:11 ` Linus Torvalds
2007-09-29 19:12 ` Davide Libenzi
2007-09-30 12:05 ` Nick Piggin [this message]
2007-09-30 3:16 ` Paul E. McKenney
2007-09-30 11:58 ` Nick Piggin
2007-09-30 15:09 ` Andi Kleen
2007-10-01 13:14 ` David Howells
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=20070930120545.GB7697@wotan.suse.de \
--to=npiggin@suse.de \
--cc=ak@suse.de \
--cc=davidel@xmailserver.org \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@us.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
all inboxes | Powered by JetHome®