From: James Bottomley <James.Bottomley@steeleye.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: David Howells <dhowells@redhat.com>,
matthew@wil.cx, anton@samba.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH] ?mb() -> smp_?mb() conversion
Date: Tue, 22 Mar 2005 11:44:23 -0600 [thread overview]
Message-ID: <1111513463.5520.53.camel@mulgrave> (raw)
In-Reply-To: <20050322091331.7b2967a1.davem@davemloft.net>
On Tue, 2005-03-22 at 09:13 -0800, David S. Miller wrote:
> On Tue, 22 Mar 2005 16:48:14 +0000
> David Howells <dhowells@redhat.com> wrote:
>
> > Matthew Wilcox <matthew@wil.cx> wrote:
> >
> > > - io_*mb() are equivalent, for io memory.
> >
> > I don't think these actually exist at the moment. My suggestion was that we
> > rename {r,w,}mb() to io_{r,w,}mb().
>
> This is the first time I've seen that ?mb() should order I/O
> accesses. My sparc64 versions certainly don't handle that
> correctly. :-) That being said, I think we're all being
> educated to so me extent in this thread.
Actually, by and large, they shouldn't the I/O domain is usually
completely separate from the processor and memory one.
There is one exception for the altix and that's the mmiowb()
instruction. You can read about it in the linux-arch archives (if you
keep them) under the subject:
[PATCH] I/O space write barrier
which is, I think where this is coming from.
As a summary: the altix has a method of imposing write ordering on the
PCI domain, which is what mmiowb does. They prefer it in certain
circumstances to a read that does a flush of posted writes because it's
a lot cheaper on their hardware. The only drivers (at least in SCSI)
that I've seen modified to use it are the ones that get plugged into the
altix.
As an aside, the main ordering problem it prevents is the SMP one where
two CPUs do writes into the PCI domain that they order with spinlocks.
Even though, temporally, the writes are sequenced leaving the CPUs, the
altix PCI domain can still re-order them if the mmiowb() isn't present
(so it sounds like it's really a smp_mmiowb()...)
James
next prev parent reply other threads:[~2005-03-22 17:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 22:59 [PATCH] ?mb() -> smp_?mb() conversion Anton Blanchard
2005-03-21 23:06 ` David S. Miller
2005-03-22 10:43 ` David Howells
2005-03-22 13:13 ` Matthew Wilcox
2005-03-22 14:27 ` David Howells
2005-03-22 16:03 ` Anton Blanchard
2005-03-22 16:34 ` Matthew Wilcox
2005-03-22 16:48 ` David Howells
2005-03-22 17:13 ` David S. Miller
2005-03-22 17:44 ` James Bottomley [this message]
2005-03-22 18:09 ` Jesse Barnes
2005-03-22 18:00 ` David Howells
2005-03-22 21:59 ` Paul Mackerras
2005-03-22 18:15 ` Jesse Barnes
2005-03-22 18:24 ` Jesse Barnes
2005-03-23 6:23 ` Paul Mackerras
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=1111513463.5520.53.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=anton@samba.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=matthew@wil.cx \
/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