From: Jack Steiner <steiner@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] don't udelay() in sn_mmiob
Date: Fri, 28 May 2004 17:28:55 +0000 [thread overview]
Message-ID: <20040528172855.GF11576@sgi.com> (raw)
In-Reply-To: <200405261749.02254.jbarnes@engr.sgi.com>
On Thu, May 27, 2004 at 05:06:31PM -0400, Jesse Barnes wrote:
> On Thursday, May 27, 2004 4:46 pm, David Mosberger wrote:
> > Wouldn't you want at least a cpu_relax() in that loop?
>
> That'll cause the CPU to switch to the other thread if it's SMT so it won't
> spin waiting for the access to complete? If so, then yes. Here's an updated
> patch.
I didn't think the code would actually spin.
sn_mmiob() is something like:
1: ld.acq r8=...
;;
cmp.eq p8,p0=r8,r9
(p8) br 1b
The "load" is an uncached load. Won't the pipeline stall on the cmp
waiting for data to arrive. I would not have expected that a cpu_relax()
would have been needed here.
Data takes a few hundred nsec to be loaded from the chipset.
If we were spinning on a CACHED memory address, I agree that cpu_relax()
is need.
>
> sn_mmiob is a lightweight way to ensure PCI write ordering, intended to be
> used as an alternative to doing a PIO read. Unfortunately, with the udelay()
> in there, it ends up being slower than a PCI read on small configurations, so
> remove it in favor of a simple cpu_relax() so that we're HT-friendly.
>
> Thanks,
> Jesse
--
Thanks
Jack Steiner (steiner@sgi.com) 651-683-5302
Principal Engineer SGI - Silicon Graphics, Inc.
next prev parent reply other threads:[~2004-05-28 17:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-26 21:49 [PATCH] don't udelay() in sn_mmiob Jesse Barnes
2004-05-27 20:46 ` David Mosberger
2004-05-27 21:06 ` Jesse Barnes
2004-05-27 21:29 ` David Mosberger
2004-05-28 17:28 ` Jack Steiner [this message]
2004-05-28 17:35 ` Jack Steiner
2004-05-29 0:57 ` Seth, Rohit
2004-05-29 14:31 ` Jack Steiner
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=20040528172855.GF11576@sgi.com \
--to=steiner@sgi.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