On 06/13/2011 03:27 PM, Venkatesh Pallipadi wrote:
On Mon, Jun 13, 2011 at 3:06 PM, Jarod Wilson [off-list ref] wrote:
quoted
TSC is high enough resolution that we can use its low-order byte to
stir new data into the random number generator entropy pool.
From what I vaguely remember from years past, rdtsc, especially last
few bits of it are not very good as random number source. As they are
based on lower bus frequency and a multiplier. May be things have
changed these days. Adding Peter and Suresh for comments.
This is correct; at the very least I would multiply the low 32 bits of
the TSC with a 32-bit prime number before mixing.
However, the big issue with this is that it's recursive... what causes
this to be invoked... probably an interrupt, which is going to have been
invoked by a timer, quite possible the TSC deadline timer. Oops.
-hpa