Re: [RFC] Improved add_timer_randomness for __CRIS__ (instead of rdtsc())

From: Oliver Xymoron (
Date: Tue Aug 20 2002 - 18:00:23 EST

On Wed, Aug 21, 2002 at 12:17:26AM +0200, wrote:

> I just compared the generated asm:
> Accurate timestamp scaled to ns: 45 instructions (resolution actually 40 ns)
> Approximate 40 ns resolution: 21 instructions
> Approximate 40 us resolution: 9 instructions
> For comparison one syscall path (gettimeofday()) is approx 400 instructions
> and the add_timer_randomness() function that only uses jiffies is 76
> instructions, so mayby I'm microoptimising here?
> Is it worth the cycles to get 40 ns resolution instead of 40us ?

Seems like it's probably worth the effort. In practice, such
difference often are lost in the noise compared to cache flushes, etc.
Does the 'correct' code suffer branch penalties or the like that might
make it significantly worse than the quick code? If not, then I'd say
definitely use it.

 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:21 EST