]> Pileus Git - ~andy/linux/commit
random: speed up the fast_mix function by a factor of four
authorTheodore Ts'o <tytso@mit.edu>
Sun, 22 Sep 2013 19:24:02 +0000 (15:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 10 Oct 2013 18:32:20 +0000 (14:32 -0400)
commit655b226470b229552ad95b21323864df9bd9fc74
tree9379bc872df3e7e859654a374e23be3fc4248521
parentf5c2742c23886e707f062881c5f206c1fc704782
random: speed up the fast_mix function by a factor of four

By mixing the entropy in chunks of 32-bit words instead of byte by
byte, we can speed up the fast_mix function significantly.  Since it
is called on every single interrupt, on systems with a very heavy
interrupt load, this can make a noticeable difference.

Also fix a compilation warning in add_interrupt_randomness() and avoid
xor'ing cycles and jiffies together just in case we have an
architecture which tries to define random_get_entropy() by returning
jiffies.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: Jörn Engel <joern@logfs.org>
drivers/char/random.c