From: Ralf Baechle <ralf@linux-mips.org>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Theodore Ts'o <tytso@mit.edu>, Andrew Morton <akpm@osdl.org>,
Anton Blanchard <anton@samba.org>,
arnd@arndb.de, richm@oldelvet.org.uk, linux-arch@vger.kernel.org
Subject: Re: Using get_cycles for add_timer_randomness
Date: Mon, 16 Aug 2004 18:44:20 +0200 [thread overview]
Message-ID: <20040816164420.GA22312@linux-mips.org> (raw)
In-Reply-To: <20040816162228.GB11200@holomorphy.com>
On Mon, Aug 16, 2004 at 09:22:28AM -0700, William Lee Irwin III wrote:
> At some point in the past, Arnd Bergmann <arnd@arndb.de> wrote:
> >> I noticed that only i386 and x86-64 are currently using a high resolution
> >> timer source when adding randomness. Since many architectures have a
> >> working get_cycles() implementation, it seems rather straightforward to use
> >> that.
>
> On Mon, Aug 16, 2004 at 12:17:56PM -0400, Theodore Ts'o wrote:
> > My only concern about using get_cycles is the speed question; on some
> > architectures, could (particularly those without TSC registers or
> > equivalent hardware support) could get_cycles() be slow enough to cause
> > latency problems?
>
> AFAICT most of those return 0 from get_cycles().
The cycle counter on MIPS processors [1] is only 32-bit. I've been
pondering to construct a 64-bit value in get_cycles() which would seriously
slow down the function compared to the current single instruction
implementation; fortunately a quick survey of all get_cycles() users a
while ago did look like non of them actually requires the full 64-bit.
Ralf
[1] Some older processors don't have at all.
next prev parent reply other threads:[~2004-08-16 16:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200308160303.17612.arnd@arndb.de>
[not found] ` <20040810162435.GK24690@krispykreme>
[not found] ` <20040814183623.GB5637@krispykreme>
2004-08-15 22:48 ` Using get_cycles for add_timer_randomness Andrew Morton
2004-08-15 23:46 ` Richard Mortimer
2004-08-15 23:59 ` David S. Miller
2004-08-16 16:17 ` Theodore Ts'o
2004-08-16 16:22 ` William Lee Irwin III
2004-08-16 16:44 ` Ralf Baechle [this message]
2004-08-16 16:49 ` William Lee Irwin III
2004-08-19 18:26 ` Ralf Baechle
2004-08-16 18:53 Luck, Tony
-- strict thread matches above, loose matches on Subject: below --
2004-08-16 21:29 Luck, Tony
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=20040816164420.GA22312@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=richm@oldelvet.org.uk \
--cc=tytso@mit.edu \
--cc=wli@holomorphy.com \
/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