public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: David Howells <dhowells@redhat.com>,
	Linus Torvalds <torvalds@osdl.org>,
	akpm@osdl.org, ak@suse.de, mingo@redhat.com, jblunck@suse.de,
	bcrl@linux.intel.com, linux-arch@vger.kernel.org,
	linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: Memory barriers and spin_unlock safety
Date: Tue, 7 Mar 2006 09:56:16 -0800	[thread overview]
Message-ID: <200603070956.16763.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <20060307174057.GD7301@parisc-linux.org>

On Tuesday, March 7, 2006 9:40 am, Matthew Wilcox wrote:
> On Tue, Mar 07, 2006 at 05:36:59PM +0000, David Howells wrote:
> > David Howells <dhowells@redhat.com> wrote:
> > > I suspect, then, that x86_64 should not have an SFENCE for
> > > smp_wmb(), and that only io_wmb() should have that.
> >
> > Hmmm... We don't actually have io_wmb()... Should the following be
> > added to all archs?
> >
> > 	io_mb()
> > 	io_rmb()
> > 	io_wmb()
>
> it's spelled mmiowb(), and reads from IO space are synchronous, so
> don't need barriers.

To expand on willy's note, the reason it's called mmiowb as opposed to 
iowb is because I/O port acccess (inX/outX) are inherently synchronous 
and don't need barriers.  mmio writes, however (writeX) need barrier 
operations to ensure ordering on some platforms.

This raises the question of what semantics the unified I/O mapping 
routines have... are ioreadX/iowriteX synchronous or should we define 
the barriers you mention above for them?  (IIRC ppc64 can use an io read 
ordering op).

Jesse

  reply	other threads:[~2006-03-07 17:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-03 16:03 Memory barriers and spin_unlock safety David Howells
2006-03-03 16:45 ` David Howells
2006-03-03 17:03   ` Linus Torvalds
2006-03-03 20:17     ` David Howells
2006-03-03 21:34       ` Linus Torvalds
2006-03-03 21:51         ` Benjamin LaHaise
2006-03-03 22:21           ` Linus Torvalds
2006-03-03 22:36             ` Linus Torvalds
2006-03-07 17:36       ` David Howells
2006-03-07 17:40         ` Matthew Wilcox
2006-03-07 17:56           ` Jesse Barnes [this message]
2006-03-07 18:18         ` Alan Cox
2006-03-07 18:28           ` Linus Torvalds
2006-03-07 18:55             ` Alan Cox
2006-03-07 20:21               ` Linus Torvalds
2006-03-03 20:02   ` Arjan van de Ven
2006-03-03 16:55 ` Linus Torvalds
2006-03-03 20:15   ` David Howells
2006-03-03 21:31     ` Linus Torvalds
2006-03-03 21:06   ` Benjamin Herrenschmidt
2006-03-03 21:18     ` Hollis Blanchard
2006-03-03 21:52       ` David S. Miller
2006-03-03 22:04     ` Linus Torvalds
2006-03-04 10:58     ` Paul Mackerras
2006-03-04 22:49       ` Benjamin Herrenschmidt
2006-03-04 10:58   ` Paul Mackerras
2006-03-04 17:28     ` Linus Torvalds
2006-03-08  3:20       ` Paul Mackerras
2006-03-08  3:54         ` Linus Torvalds
2006-03-08 13:12           ` Alan Cox
2006-03-08 15:30             ` Linus Torvalds
2006-03-05  2:04     ` Michael Buesch

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=200603070956.16763.jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=bcrl@linux.intel.com \
    --cc=dhowells@redhat.com \
    --cc=jblunck@suse.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.org \
    --cc=matthew@wil.cx \
    --cc=mingo@redhat.com \
    --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