mbox series

[0/9] crypto: qce - refactor the driver

Message ID 20241203-crypto-qce-refactor-v1-0-c5901d2dd45c@linaro.org (mailing list archive)
Headers show
Series crypto: qce - refactor the driver | expand

Message

Bartosz Golaszewski Dec. 3, 2024, 9:19 a.m. UTC
This driver will soon be getting more features so show it some 
refactoring love in the meantime. Switching to using a workqueue and 
sleeping locks improves cryptsetup benchmark results for AES encryption.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bartosz Golaszewski (9):
      crypto: qce - fix goto jump in error path
      crypto: qce - unregister previously registered algos in error path
      crypto: qce - remove unneeded call to icc_set_bw() in error path
      crypto: qce - shrink code with devres clk helpers
      crypto: qce - convert qce_dma_request() to use devres
      crypto: qce - make qce_register_algs() a managed interface
      crypto: qce - use __free() for a buffer that's always freed
      crypto: qce - convert tasklet to workqueue
      crypto: qce - switch to using a mutex

 drivers/crypto/qce/core.c | 131 ++++++++++++++++------------------------------
 drivers/crypto/qce/core.h |   9 ++--
 drivers/crypto/qce/dma.c  |  22 ++++----
 drivers/crypto/qce/dma.h  |   3 +-
 drivers/crypto/qce/sha.c  |   6 +--
 5 files changed, 68 insertions(+), 103 deletions(-)
---
base-commit: f486c8aa16b8172f63bddc70116a0c897a7f3f02
change-id: 20241128-crypto-qce-refactor-ab58869eec34

Best regards,

Comments

Eric Biggers Dec. 3, 2024, 5:35 p.m. UTC | #1
On Tue, Dec 03, 2024 at 10:19:28AM +0100, Bartosz Golaszewski wrote:
> This driver will soon be getting more features so show it some 
> refactoring love in the meantime. Switching to using a workqueue and 
> sleeping locks improves cryptsetup benchmark results for AES encryption.

What is motivating this work?  I thought this driver is useless because ARMv8 CE
is an order of magnitude faster.

- Eric
Eric Biggers Dec. 3, 2024, 6:08 p.m. UTC | #2
On Tue, Dec 03, 2024 at 09:35:03AM -0800, Eric Biggers wrote:
> On Tue, Dec 03, 2024 at 10:19:28AM +0100, Bartosz Golaszewski wrote:
> > This driver will soon be getting more features so show it some 
> > refactoring love in the meantime. Switching to using a workqueue and 
> > sleeping locks improves cryptsetup benchmark results for AES encryption.
> 
> What is motivating this work?  I thought this driver is useless because ARMv8 CE
> is an order of magnitude faster.
> 

I see what might be happening.  This driver registers its algorithms with too
high of a priority, which makes it get used when it shouldn't be.  I've sent out
a patch to fix that.

- Eric
Bartosz Golaszewski Dec. 3, 2024, 8:55 p.m. UTC | #3
On Tue, Dec 3, 2024 at 6:35 PM Eric Biggers <ebiggers@kernel.org> wrote:
>
> On Tue, Dec 03, 2024 at 10:19:28AM +0100, Bartosz Golaszewski wrote:
> > This driver will soon be getting more features so show it some
> > refactoring love in the meantime. Switching to using a workqueue and
> > sleeping locks improves cryptsetup benchmark results for AES encryption.
>
> What is motivating this work?  I thought this driver is useless because ARMv8 CE
> is an order of magnitude faster.
>

We'll be extending support for this IP with some additional features
soon like using device unique keys etc. This is just some refreshment
of this module.

Bartosz
Herbert Xu Dec. 14, 2024, 9:27 a.m. UTC | #4
On Tue, Dec 03, 2024 at 10:19:28AM +0100, Bartosz Golaszewski wrote:
> This driver will soon be getting more features so show it some 
> refactoring love in the meantime. Switching to using a workqueue and 
> sleeping locks improves cryptsetup benchmark results for AES encryption.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Bartosz Golaszewski (9):
>       crypto: qce - fix goto jump in error path
>       crypto: qce - unregister previously registered algos in error path
>       crypto: qce - remove unneeded call to icc_set_bw() in error path
>       crypto: qce - shrink code with devres clk helpers
>       crypto: qce - convert qce_dma_request() to use devres
>       crypto: qce - make qce_register_algs() a managed interface
>       crypto: qce - use __free() for a buffer that's always freed
>       crypto: qce - convert tasklet to workqueue
>       crypto: qce - switch to using a mutex
> 
>  drivers/crypto/qce/core.c | 131 ++++++++++++++++------------------------------
>  drivers/crypto/qce/core.h |   9 ++--
>  drivers/crypto/qce/dma.c  |  22 ++++----
>  drivers/crypto/qce/dma.h  |   3 +-
>  drivers/crypto/qce/sha.c  |   6 +--
>  5 files changed, 68 insertions(+), 103 deletions(-)
> ---
> base-commit: f486c8aa16b8172f63bddc70116a0c897a7f3f02
> change-id: 20241128-crypto-qce-refactor-ab58869eec34

All applied.  Thanks.