From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
"David S. Miller" <davem@davemloft.net>,
Jeff Garzik <jgarzik@pobox.com>,
Paul Mackerras <paulus@samba.org>,
Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: [RFC] MMIO accessors & barriers documentation
Date: Tue, 12 Sep 2006 17:13:20 +1000 [thread overview]
Message-ID: <1158045200.15465.94.camel@localhost.localdomain> (raw)
In-Reply-To: <m1d5a17g5u.fsf@ebiederm.dsl.xmission.com>
> ioremap_wc is actually the easy half. I have an old patch that handles
> that. The trick is to make certain multiple people don't map the same
> thing with different attributes. Unfortunately I haven't had time to
> work through that one yet.
Actually, that's interesting because I need the exactly oposite on
PowerPC I think.... That is people will -need- to do both a wc and a
non-wc mapping if they want to be able to issue stores that are
guaranteed not to be combined.
The problem I've seen is that at least one processor (the Cell) and
maybe more seem to be combining between threads on the same CPU (unless
the stores are issues to a guarded mapping which prevents combining
completely, that is the sort of mapping we currently do with ioremap).
That means that it's impossible to prevent combining with explicit
barriers. For example:
Thread 0 Thread 1
store to A store to A+1
barrier barrier
\ /
\ /
\ /
Store unit might sees:
store to A
store to A+1
barrier
barrier
That is the stores aren't tagged with their source thread and thus the
non cacheable store unit will not prevent combining between them.
Again, it might just be a Cell CPU bug in which case we may have to just
disable use of WC on that processor, period. But it might be a more
generic problem too, we need to investigate.
If the problem ends up being widespread, the only ways I see to prevent
the combining from happening are to do a dual mapping as I explained
earlier, or maybe to have drivers always do the stores that must not be
combine as part of spinlocks, with appropriate use of
io_to_lock_barrier() (mmiowb()).
Anyway, let's not pollute this discussion with that too much now :)
Ben.
next prev parent reply other threads:[~2006-09-12 7:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-11 4:03 [RFC] MMIO accessors & barriers documentation Benjamin Herrenschmidt
2006-09-11 8:57 ` Alan Cox
2006-09-11 9:17 ` Benjamin Herrenschmidt
2006-09-11 10:07 ` Alan Cox
2006-09-11 9:59 ` Benjamin Herrenschmidt
2006-09-11 17:26 ` Alan Cox
2006-09-11 21:29 ` Benjamin Herrenschmidt
2006-09-12 5:48 ` Eric W. Biederman
2006-09-12 5:56 ` Benjamin Herrenschmidt
2006-09-12 6:27 ` Eric W. Biederman
2006-09-12 7:13 ` Benjamin Herrenschmidt [this message]
2006-09-12 15:19 ` Segher Boessenkool
2006-09-12 21:22 ` Benjamin Herrenschmidt
2006-09-13 0:12 ` Segher Boessenkool
2006-09-13 1:34 ` Benjamin Herrenschmidt
2006-09-11 18:39 ` Jesse Barnes
2006-09-11 21:45 ` Benjamin Herrenschmidt
2006-09-11 21:54 ` Jeff Garzik
2006-09-11 22:56 ` Benjamin Herrenschmidt
2006-09-11 23:08 ` Roland Dreier
2006-09-11 23:18 ` Benjamin Herrenschmidt
2006-09-11 23:24 ` Jeff Garzik
2006-09-12 0:46 ` Benjamin Herrenschmidt
2006-09-12 15:32 ` Segher Boessenkool
2006-09-11 22:05 ` Jesse Barnes
2006-09-11 23:01 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2006-09-12 5:33 Albert Cahalan
2006-09-12 5:48 ` Benjamin Herrenschmidt
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=1158045200.15465.94.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=jbarnes@virtuousgeek.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.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