]> git.baikalelectronics.ru Git - kernel.git/commit
random: make /dev/urandom scalable for silly userspace programs
authorTheodore Ts'o <tytso@mit.edu>
Mon, 2 May 2016 06:04:41 +0000 (02:04 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 3 Jul 2016 04:57:58 +0000 (00:57 -0400)
commiteaef70dc9010fd298da1987d168926c1504938db
tree2ffd7732681f0cd243ba0e2cb934cc37f59bd2ca
parenta3804d807fe1c22c4fea5deab04def642b9b1391
random: make /dev/urandom scalable for silly userspace programs

On a system with a 4 socket (NUMA) system where a large number of
application threads were all trying to read from /dev/urandom, this
can result in the system spending 80% of its time contending on the
global urandom spinlock.  The application should have used its own
PRNG, but let's try to help it from running, lemming-like, straight
over the locking cliff.

Reported-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
drivers/char/random.c