mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-26 18:16:26 +00:00
random: optimize spinlock use in add_device_randomness()
The add_device_randomness() function calls mix_pool_bytes() twice for the input pool and the non-blocking pool, for a total of four times. By using _mix_pool_byte() and taking the spinlock in add_device_randomness(), we can halve the number of times we need take each pool's spinlock. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
5910895f0e
commit
3ef4cb2d65
1 changed files with 10 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue