mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: neil.armstrong@linaro.org
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-crypto@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Stanimir Varbanov <svarbanov@mm-sol.com>
Subject: Re: [PATCH 9/9] crypto: qce - switch to using a mutex
Date: Wed, 4 Dec 2024 11:17:46 +0100	[thread overview]
Message-ID: <af4c67a6-9ed6-4174-a41e-95b03ab96166@linaro.org> (raw)
In-Reply-To: <CAMRc=MevaM4tUNQUs_LjFYaUtDH=YqE-t2gBponGqtK5xE9Gpw@mail.gmail.com>

On 03/12/2024 16:10, Bartosz Golaszewski wrote:
> On Tue, 3 Dec 2024 14:53:21 +0100, neil.armstrong@linaro.org said:
>> On 03/12/2024 10:19, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>
>>> 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


  reply	other threads:[~2024-12-04 10:17 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03  9:19 [PATCH 0/9] crypto: qce - refactor the driver Bartosz Golaszewski
2024-12-03  9:19 ` [PATCH 1/9] crypto: qce - fix goto jump in error path Bartosz Golaszewski
2024-12-03 13:43   ` neil.armstrong
2024-12-03  9:19 ` [PATCH 2/9] crypto: qce - unregister previously registered algos " Bartosz Golaszewski
2024-12-03 13:55   ` neil.armstrong
2024-12-03 15:05     ` Bartosz Golaszewski
2024-12-04 10:17       ` neil.armstrong
2024-12-03  9:19 ` [PATCH 3/9] crypto: qce - remove unneeded call to icc_set_bw() " Bartosz Golaszewski
2024-12-03 13:45   ` neil.armstrong
2024-12-03  9:19 ` [PATCH 4/9] crypto: qce - shrink code with devres clk helpers Bartosz Golaszewski
2024-12-03 13:46   ` neil.armstrong
2024-12-03 18:32   ` Stephan Gerhold
2024-12-03 20:39     ` Bartosz Golaszewski
2024-12-03  9:19 ` [PATCH 5/9] crypto: qce - convert qce_dma_request() to use devres Bartosz Golaszewski
2024-12-03 13:49   ` neil.armstrong
2024-12-03  9:19 ` [PATCH 6/9] crypto: qce - make qce_register_algs() a managed interface Bartosz Golaszewski
2024-12-03 13:50   ` neil.armstrong
2024-12-03  9:19 ` [PATCH 7/9] crypto: qce - use __free() for a buffer that's always freed Bartosz Golaszewski
2024-12-03 13:52   ` neil.armstrong
2024-12-03  9:19 ` [PATCH 8/9] crypto: qce - convert tasklet to workqueue Bartosz Golaszewski
2024-12-03 13:52   ` neil.armstrong
2024-12-03  9:19 ` [PATCH 9/9] crypto: qce - switch to using a mutex Bartosz Golaszewski
2024-12-03 13:53   ` neil.armstrong
2024-12-03 15:10     ` Bartosz Golaszewski
2024-12-04 10:17       ` neil.armstrong [this message]
2025-01-18  8:06       ` Eric Biggers
2025-01-18  9:28         ` Bartosz Golaszewski
2025-01-18 17:55           ` Eric Biggers
2025-01-20 13:46             ` Bartosz Golaszewski
2025-02-20  9:14               ` Bartosz Golaszewski
2025-02-20 19:19                 ` Eric Biggers
2024-12-03 17:35 ` [PATCH 0/9] crypto: qce - refactor the driver Eric Biggers
2024-12-03 18:08   ` Eric Biggers
2024-12-03 20:55   ` Bartosz Golaszewski
2024-12-14  9:27 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af4c67a6-9ed6-4174-a41e-95b03ab96166@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=svarbanov@mm-sol.com \
    --cc=thara.gopinath@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®