From: Michael Buesch <mbuesch@freenet.de>
To: Paul Mackerras <paulus@samba.org>
Cc: David Howells <dhowells@redhat.com>,
akpm@osdl.org, linux-arch@vger.kernel.org, bcrl@linux.intel.com,
matthew@wil.cx, linux-kernel@vger.kernel.org, mingo@redhat.com,
linuxppc64-dev@ozlabs.org, jblunck@suse.de,
Linus Torvalds <torvalds@osdl.org>
Subject: Re: Memory barriers and spin_unlock safety
Date: Sun, 5 Mar 2006 03:04:40 +0100 [thread overview]
Message-ID: <200603050304.41436.mbuesch@freenet.de> (raw)
In-Reply-To: <17417.29375.87604.537434@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]
On Saturday 04 March 2006 11:58, you wrote:
> Linus Torvalds writes:
>
> > PPC has an absolutely _horrible_ memory ordering implementation, as far as
> > I can tell. The thing is broken. I think it's just implementation
> > breakage, not anything really fundamental, but the fact that their write
> > barriers are expensive is a big sign that they are doing something bad.
>
> An smp_wmb() is just an eieio on PPC, which is pretty cheap. I made
> wmb() be a sync though, because it seemed that there were drivers that
> expected wmb() to provide an ordering between a write to memory and a
> write to an MMIO register. If that is a bogus assumption then we
> could make wmb() lighter-weight (after auditing all the drivers we're
> interested in, of course, ...).
In the bcm43xx driver there is code which looks like the following:
/* Write some coherent DMA memory */
wmb();
/* Write MMIO, which depends on the DMA memory
* write to be finished.
*/
Are the assumptions in this code correct? Is wmb() the correct thing
to do here?
I heavily tested this code on PPC UP and did not see any anormaly, yet.
--
Greetings Michael.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-03-05 2:04 UTC|newest]
Thread overview: 35+ 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
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-06 9:06 ` Helge Hafting
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 [this message]
[not found] <5Ml19-2Ki-19@gated-at.bofh.it>
[not found] ` <5MlO0-3JU-13@gated-at.bofh.it>
[not found] ` <5MCF0-2TS-27@gated-at.bofh.it>
[not found] ` <5MITJ-2l4-15@gated-at.bofh.it>
[not found] ` <5NXxl-6WZ-9@gated-at.bofh.it>
[not found] ` <5NY0h-7wa-1@gated-at.bofh.it>
2006-03-11 1:19 ` Robert Hancock
2006-03-12 18:09 ` Alan Cox
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=200603050304.41436.mbuesch@freenet.de \
--to=mbuesch@freenet.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=paulus@samba.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