From: Herbert Xu <herbert@gondor.apana.org.au>
To: Maxime MERE <maxime.mere@foss.st.com>
Cc: "David S . Miller" <davem@davemloft.net>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Thomas Bourgoin" <thomas.bourgoin@foss.st.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Eric Biggers" <ebiggers@google.com>,
"Rob Herring" <robh@kernel.org>,
linux-crypto@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: stm32/hash - add full DMA support for stm32mpx
Date: Fri, 19 Apr 2024 19:02:35 +0800 [thread overview]
Message-ID: <ZiJPS1dhc/uOT08A@gondor.apana.org.au> (raw)
In-Reply-To: <20240412124545.2704487-1-maxime.mere@foss.st.com>
On Fri, Apr 12, 2024 at 02:45:45PM +0200, Maxime MERE wrote:
> From: Maxime Méré <maxime.mere@foss.st.com>
>
> Due to a lack of alignment in the data sent by requests, the actual DMA
> support of the STM32 hash driver is only working with digest calls.
> This patch, based on the algorithm used in the driver omap-sham.c,
> allows for the usage of DMA in any situation.
>
> It has been functionally tested on STM32MP15, STM32MP13 and STM32MP25.
>
> By checking the performance of this new driver with OpenSSL, the
> following results were found:
>
> Performance:
>
> (datasize: 4096, number of hashes performed in 10s)
>
> |type |no DMA |DMA support|software |
> |-------|----------|-----------|----------|
> |md5 |13873.56k |10958.03k |71163.08k |
> |sha1 |13796.15k |10729.47k |39670.58k |
> |sha224 |13737.98k |10775.76k |22094.64k |
> |sha256 |13655.65k |10872.01k |22075.39k |
>
> CPU Usage:
>
> (algorithm used: sha256, computation time: 20s, measurement taken at
> ~10s)
>
> |datasize |no DMA |DMA | software |
> |----------|-------|-----|----------|
> | 2048 | 56% | 49% | 50% |
> | 4096 | 54% | 46% | 50% |
> | 8192 | 53% | 40% | 50% |
> | 16384 | 53% | 33% | 50% |
>
> Note: this update doesn't change the driver performance without DMA.
>
> As shown, performance with DMA is slightly lower than without, but in
> most cases, it will save CPU time.
>
> Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
> ---
> drivers/crypto/stm32/stm32-hash.c | 570 +++++++++++++++++++++++-------
> 1 file changed, 448 insertions(+), 122 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2024-04-19 11:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 12:45 [PATCH] crypto: stm32/hash - add full DMA support for stm32mpx Maxime MERE
2024-04-19 11:02 ` Herbert Xu [this message]
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=ZiJPS1dhc/uOT08A@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=alexandre.torgue@foss.st.com \
--cc=davem@davemloft.net \
--cc=ebiggers@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=maxime.mere@foss.st.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=robh@kernel.org \
--cc=thomas.bourgoin@foss.st.com \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).