From: Jesse Barnes <jbarnes@sgi.com>
To: David Mosberger <davidm@hpl.hp.com>
Cc: Dan Maas <dmaas@dcine.com>,
linux-kernel@vger.kernel.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Ben Collins <bcollins@debian.org>
Subject: Re: readl/writel and memory barriers
Date: Tue, 19 Feb 2002 10:35:06 -0800 [thread overview]
Message-ID: <20020219103506.A1511175@sgi.com> (raw)
In-Reply-To: <092401c1b8e7$1d190660$1a01a8c0@allyourbase> <15474.34580.625864.963930@napali.hpl.hp.com>
In-Reply-To: <15474.34580.625864.963930@napali.hpl.hp.com>
On Tue, Feb 19, 2002 at 09:10:44AM -0800, David Mosberger wrote:
> On ia64, the fact that readl()/writel() are accessing uncached space
> ensures the CPU doesn't reorder the accesses. Furthermore, the
> accesses are performed through "volatile" pointers, which ensures that
> the compiler doesn't reorder them (and, as a side-effect, such
> pointers also generate ordered loads/stores, but this isn't strictly
> needed, due to accessing uncached space).
Making a variable volatile doesn't guarantee that the compiler won't
reorder references to it, AFAIK. And on some platforms, even uncached
I/O references aren't necessarily ordered.
To avoid the overhead of having I/O flushed on every memory barrier
and readX/writeX operation, we've introduced mmiob() on ia64, which
explicity orders I/O space accesses. Some ports have chosen to take
the performance hit in every readX/writeX, memory barrier, and
spinlock however (e.g. PPC64, MIPS).
Is this a reasonable approach? Is it acceptable to have a seperate
barrier operation for I/O space? If so, perhaps other archs would be
willing to add mmiob() ops?
Thanks,
Jesse
next prev parent reply other threads:[~2002-02-19 18:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-19 1:45 readl/writel and memory barriers Dan Maas
2002-02-19 9:31 ` Alan Cox
2002-02-19 17:10 ` David Mosberger
2002-02-19 18:35 ` Jesse Barnes [this message]
2002-02-19 19:33 ` David Mosberger
2002-02-19 19:42 ` Jesse Barnes
2002-02-19 20:11 ` Dan Maas
2002-02-19 20:23 ` Jesse Barnes
2002-02-19 22:05 ` Keith Owens
2002-02-19 22:17 ` Jesse Barnes
2002-02-21 0:29 ` Randy.Dunlap
2002-02-23 4:48 ` Daniel Phillips
2002-02-25 16:19 ` Randy.Dunlap
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=20020219103506.A1511175@sgi.com \
--to=jbarnes@sgi.com \
--cc=bcollins@debian.org \
--cc=benh@kernel.crashing.org \
--cc=davidm@hpl.hp.com \
--cc=dmaas@dcine.com \
--cc=linux-kernel@vger.kernel.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