Re: Update to the /dev/random driver

Theodore Y. Ts'o (tytso@MIT.EDU)
Thu, 30 Apr 1998 19:15:10 -0400


Date: Thu, 30 Apr 1998 16:13:09 +0200
From: Alexander Kjeldaas <astor@guardian.no>

Hi, do you know how much get_random_bytes has improved? I implemented
random pids in an earlier patch and it was a bit slow (not a lot, but
a bit ;). Also, will it improve performance if I read a number of
bytes >2 and have a few bytes of "cache" in the allocate_pid routine
or is this done internally in the random driver?

It's a little faster, but the speed is still dominating by the crypto
hash function. There have been some minor tweaks to make it faster, but
nothing major. You can change the define for SHA_CODE_SIZE if you want
to make it up to twice at fast, at the cost of making the SHA crypto
approximately 5-6k bigger, if I remember the expansion size correctly.

"Cacheing" some random bytes will help, as we don't do this internally
in the random driver today.

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu