In recent kernel releases there have been performance enhancements to the AES implementations and other cryptographic subsystem code for speeding up the performance on modern Intel and AMD processors. With Linux 6.16 there will be at least some additional small gains to find with Intel and AMD processors bearing AVX-512 when employing AES-XTS.
Eric Biggers of Google who has been responsible for many of the recent AMD/Intel crypto performance optimizations saw last week another one of his patches queued into the crypto development code ahead of the Linux 6.16 cycle. This patch provides some small improvements to the AES-XTS performance for Intel and AMD x86_64 CPUs with AVX-512, on top of all the other enhancements made in prior months. Biggers explains in the patch:
“Optimize the AVX-512 version of _compute_first_set_of_tweaks by using vectorized shifts to compute the first vector of tweak blocks, and by using byte-aligned shifts when multiplying by x^8.
AES-XTS performance on AMD Ryzen 9 9950X (Zen 5) improves by about 2% for 4096-byte messages or 6% for 512-byte messages. AES-XTS performance on Intel Sapphire Rapids improves by about 1% for 4096-byte messages or 3% for 512-byte messages. Code size decreases by 75 bytes which outweighs the increase in rodata size of 16 bytes.”
Separately, also coming for Linux 6.16 is dropping the AVX10-256 paths he had been working on… Thanks to Intel’s late change of getting rid of AVX10.2-256 mode and now allowing for 512-bit everywhere with AVX10.
We’ll see what other crypto performance optimizations Eric Biggers may still prepare for Linux 6.16 in the coming weeks.