From: Jesse Barnes <jbarnes@engr.sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] don't udelay() in sn_mmiob
Date: Thu, 27 May 2004 21:06:31 +0000 [thread overview]
Message-ID: <200405271706.32205.jbarnes@engr.sgi.com> (raw)
In-Reply-To: <200405261749.02254.jbarnes@engr.sgi.com>
[-- Attachment #1: Type: text/plain, Size: 598 bytes --]
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.
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
[-- Attachment #2: no-udelay-mmiob.patch --]
[-- Type: text/x-diff, Size: 442 bytes --]
===== arch/ia64/sn/io/machvec/iomv.c 1.8 vs edited =====
--- 1.8/arch/ia64/sn/io/machvec/iomv.c Tue Sep 16 12:00:45 2003
+++ edited/arch/ia64/sn/io/machvec/iomv.c Wed May 26 13:49:19 2004
@@ -71,6 +71,6 @@
{
while ((((volatile unsigned long) (*pda->pio_write_status_addr)) & SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK) !=
SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK)
- udelay(1);
+ cpu_relax();
}
EXPORT_SYMBOL(sn_mmiob);
next prev parent reply other threads:[~2004-05-27 21:06 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 [this message]
2004-05-27 21:29 ` David Mosberger
2004-05-28 17:28 ` Jack Steiner
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=200405271706.32205.jbarnes@engr.sgi.com \
--to=jbarnes@engr.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