From: Oliver Xymoron <oxymoron@waste.org>
To: johan.adolfsson@axis.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] Improved add_timer_randomness for __CRIS__ (instead of rdtsc())
Date: Tue, 20 Aug 2002 14:34:09 -0500 [thread overview]
Message-ID: <20020820193408.GG19225@waste.org> (raw)
In-Reply-To: <05da01c2487e$b2321120$b9b270d5@homeip.net>
On Tue, Aug 20, 2002 at 09:20:50PM +0200, johan.adolfsson@axis.com wrote:
> > > > Perhaps something like:
> > > >
> > > > speed=get_timestamp_khz;
> > > > lowbits=get_hires_timestamp();
> > >
> > > But isn't the "num ^= high;" a way to improve the randomness
> > > and the high value doesn't really need to be linear to the time?
> >
> > No, the high order bits aren't very interesting at all. Don't worry
> > about that bit, it's just cuteness.
>
> ok:-)
> But if the the timestamp doesn't have to be entirely accurate
> the name should perhaps reflect that, since at least on the cris arch
> you can save some cycles if you can accept a glitch now and then.
Describe this glitch again? Bear in mind that resolution is a very
different matter than accuracy. Jiffies are not accurate in any
absolute sense, but they are monotonic. And unless you've got
interrupts shut off, even get_cycles can only giving you the time
when it stores the timestamp in the register, which may have little to
do with the time the next instruction that uses it executes.
> We want to be able to separate it from similar functions used
> for high-res timers etc. which need a more accurate function.
Bear in mind that most arches won't have this sort of difficulty so in
the bigger picture, this might be overkill. Put a comment next to the
generic function that says "might not be accurate" and when a user of
the interface comes along that actually cares about accuracy, the
situation can be reevaluated.
--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."
next prev parent reply other threads:[~2002-08-20 19:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-20 9:31 [RFC] Improved add_timer_randomness for __CRIS__ (instead of rdtsc()) johan.adolfsson
2002-08-20 14:03 ` Oliver Xymoron
2002-08-20 16:32 ` johan.adolfsson
2002-08-20 17:06 ` Oliver Xymoron
2002-08-20 17:34 ` johan.adolfsson
2002-08-20 18:02 ` Oliver Xymoron
2002-08-20 19:20 ` johan.adolfsson
2002-08-20 19:34 ` Oliver Xymoron [this message]
2002-08-20 22:17 ` johan.adolfsson
2002-08-20 23:00 ` Oliver Xymoron
2002-08-21 9:11 ` johan.adolfsson
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=20020820193408.GG19225@waste.org \
--to=oxymoron@waste.org \
--cc=johan.adolfsson@axis.com \
--cc=linux-kernel@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