From: Matthew Wilcox <matthew@wil.cx>
To: linux-ia64@vger.kernel.org
Subject: Should we relax in udelay()?
Date: Tue, 14 Dec 2004 19:31:12 +0000 [thread overview]
Message-ID: <20041214193112.GT27199@parcelfarce.linux.theplanet.co.uk> (raw)
Would the following patch be a good idea? Obviously, this is a busy-loop,
but does itc tick correctly while we're relaxing?
Index: include/asm-ia64/delay.h
=================================RCS file: /var/cvs/linux-2.6/include/asm-ia64/delay.h,v
retrieving revision 1.4
diff -u -p -r1.4 delay.h
--- linux/include/asm-ia64/delay.h 23 May 2004 23:52:58 -0000 1.4
+++ linux/include/asm-ia64/delay.h 14 Dec 2004 18:20:51 -0000
@@ -91,7 +91,7 @@ udelay (unsigned long usecs)
unsigned long cycles = usecs*local_cpu_data->cyc_per_usec;
while (ia64_get_itc() - start < cycles)
- /* skip */;
+ cpu_relax();
}
#endif /* _ASM_IA64_DELAY_H */
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
next reply other threads:[~2004-12-14 19:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-14 19:31 Matthew Wilcox [this message]
2004-12-16 18:23 ` Should we relax in udelay()? David Mosberger
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=20041214193112.GT27199@parcelfarce.linux.theplanet.co.uk \
--to=matthew@wil.cx \
--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