Jason Donenfeld yes WireGuard Major developers of , And so is he Linux Maintainer of kernel random number related code , Recently, under his leadership ,Linux
The kernel random number generator code has been greatly improved .
Before Linux 5.17 in ,Jason Donenfeld For random code BLAKE2s Replaced SHA1, Because BLAKE2s
Built in features , The former is usually faster and safer than the latter . Tested , With this simple transformation 131% Left and right speed increases .
Although in Linux 5.17 With a significant increase in speed , but Jason Donenfeld Not satisfied with this . So in Linux 5.18
He made more improvements to random code .
By viewing Linux of random.git It can be seen from the warehouse log （ Above ）, developer Jason Donenfeld
A lot of code submissions have been made in the last two days . These submissions will be 3 Late September Linux 5.18 Introducing the kernel at startup of the merge window for .
In the email, it is specially emphasized that , By using the latest code under development , Used to get random bytes getrandom() Call for better performance . With Intel Xeon E5-2697
v2 @ 2.70GHz CPU and 112G Memory on the device stress-ng getrandom() After benchmarking , What's more 8450% Performance improvements for .
This change will basically change the previous global structure （ Actually per-numa Node structure ） Change to per-cpu
structure , This means that many locks on the fast path will disappear . therefore , When the multi-core CPU Try at the same time on getrandom()
Hour , There is no doubt that performance will improve . But I didn't expect to bring 8450% Promotion of .
In addition , When from per-numa Change to per-cpu
after , It will no longer need to be deferred until the work queue is online . As I said before , This improvement will bring huge benefits to computers and servers with a high number of cores .