From: Grant Grundler <iod00d@hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: I/O read, write implementation questions
Date: Tue, 25 Apr 2006 23:20:58 +0000 [thread overview]
Message-ID: <20060425232058.GC27658@esmail.cup.hp.com> (raw)
In-Reply-To: <444E2EA6.8000604@bull.net>
On Tue, Apr 25, 2006 at 05:20:49PM +0200, Zoltan Menyhart wrote:
> David Mosberger-Tang wrote:
>
> >>Why do not "readb()" ... "writeb()" include "mf.a"-s?
> >
> >Again, acceptance is not normally needed by readX/writeX and mf.a is
> >extremely expensive (on the order of 1,000 cycles). If you want
> >ordering, you need to use explicit barriers (or rely on the effect of
> >"volatile" in ia64-specific code).
MMIO reads cost between 1000-3000 cycles anyway depending on the
configuration. "mmio_test" on gnumonks.org/svn/mmio_test (roughly)
will help people measure the exact cost.
> Assuming a device driver uses memory mapped I/O, what is the architecture
> independent way to make sure that the I/O reads - writes are accepted ?
> (I cannot use "__ia64_mf_a()".)
I think it depends on your definition of "accepted".
I tried addressing this question before:
http://iou.parisc-linux.org/porting_zx1/4_4MMIO_Write_Ordering.html
I believe for mmio writes, the section on "Posted MMIO Writes" in
the same paper answers your question.
The CPU will stall for MMIO reads and thus only needs mb() or wmb()
depending on what ordering is required.
> What is the difference between "readb_relaxed()" and "readb()"?
> Were not they defined to provide both strict and weak (relaxed)
> I/O ordering?
This is a hack added for SGI Altix. The "_relaxed()" in this
case refers to PCI ordering rules that could be violated by
SGI HW (and the violation causes no harm). Use google for read_relaxed
(or was it write_relaxed?) discussion between Jesse Barnes
and myself about 2 years ago.
hth,
grant
next prev parent reply other threads:[~2006-04-25 23:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 14:13 I/O read, write implementation questions Zoltan Menyhart
2006-04-25 14:46 ` David Mosberger-Tang
2006-04-25 15:20 ` Zoltan Menyhart
2006-04-25 23:20 ` Grant Grundler [this message]
2006-04-26 15:48 ` Brent Casavant
2006-04-26 15:53 ` Brent Casavant
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=20060425232058.GC27658@esmail.cup.hp.com \
--to=iod00d@hp.com \
--cc=linux-ia64@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