Re: [PATCH 9/9] crypto: qce - switch to using a mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/12/2024 16:10, Bartosz Golaszewski wrote:
On Tue, 3 Dec 2024 14:53:21 +0100, neil.armstrong@xxxxxxxxxx said:
On 03/12/2024 10:19, Bartosz Golaszewski wrote:
From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>

Having switched to workqueue from tasklet, we are no longer limited to
atomic APIs and can now convert the spinlock to a mutex. This, along
with the conversion from tasklet to workqueue grants us ~15% improvement
in cryptsetup benchmarks for AES encryption.

Can you share on which platforms you did the tests and the results you got ?


Sure, I tested on sm8650 with the following results (they vary from
one run to other but are more or less in this range):

With this series:

#     Algorithm |       Key |      Encryption |      Decryption
         aes-cbc        128b        94.1 MiB/s       138.6 MiB/s
     serpent-cbc        128b               N/A               N/A
     twofish-cbc        128b               N/A               N/A
         aes-cbc        256b        94.8 MiB/s       128.5 MiB/s
     serpent-cbc        256b               N/A               N/A
     twofish-cbc        256b               N/A               N/A
         aes-xts        256b       132.9 MiB/s       131.8 MiB/s
     serpent-xts        256b               N/A               N/A
     twofish-xts        256b               N/A               N/A
         aes-xts        512b       122.6 MiB/s       122.4 MiB/s
     serpent-xts        512b               N/A               N/A
     twofish-xts        512b               N/A               N/A

Without it:

#     Algorithm |       Key |      Encryption |      Decryption
         aes-cbc        128b        96.4 MiB/s       141.0 MiB/s
     serpent-cbc        128b               N/A               N/A
     twofish-cbc        128b               N/A               N/A
         aes-cbc        256b        67.0 MiB/s        97.8 MiB/s
     serpent-cbc        256b               N/A               N/A
     twofish-cbc        256b               N/A               N/A
         aes-xts        256b       131.7 MiB/s       132.0 MiB/s
     serpent-xts        256b               N/A               N/A
     twofish-xts        256b               N/A               N/A
         aes-xts        512b        93.9 MiB/s        96.8 MiB/s
     serpent-xts        512b               N/A               N/A
     twofish-xts        512b               N/A               N/A

AES-CBC and AES-XTS with shorter keys remain pretty much the same. I'm not
sure why that is. I also tested on sa8775p but there are no visible
improvements there. :(

Thanks for the results !

Neil


Bart





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux