From: Dmitry Kasatkin <d.kasatkin@samsung.com>
To: joelf@ti.com
Cc: Herbert Xu <herbert@gondor.hengli.com.au>,
"David S. Miller" <davem@davemloft.net>,
Mark Greer <mgreer@animalcreek.com>,
Tony Lindgren <tony@atomide.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Rajendra Nayak <rnayak@ti.com>, Lokesh Vutla <lokeshvutla@ti.com>,
Linux OMAP List <linux-omap@vger.kernel.org>,
Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH 00/10] crypto: omap-aes: DMA and PIO mode improvements
Date: Thu, 15 Aug 2013 08:58:34 +0300 [thread overview]
Message-ID: <520C6E0A.8030505@samsung.com> (raw)
In-Reply-To: <520C1327.8090607@ti.com>
On 15/08/13 02:30, Joel Fernandes wrote:
> On 08/14/2013 06:12 PM, Joel Fernandes wrote:
>> This patch series is a rewrite of the DMA portion of omap-aes driver
>> and also adds support for PIO mode. Both these modes, give better
>> performance than before.
>>
>> Earlier, only a single SG was used for DMA purpose, and the SG-list
>> passed from the crypto layer was being copied and DMA'd one entry at
>> a time. This turns out to be quite inefficient, so we replace it with
>> much simpler code that directly passes the SG-list from crypto to the
>> DMA layer.
>>
>> We also add PIO mode support to the driver, and switch to PIO mode
>> whenever the DMA channel allocation is not available. This is only for
>> OMAP4 platform will work on any platform on which IRQ information is
>> populated.
>>
>> Tests performed on am33xx and omap4 SoCs , notice the 50% perf improvement
> Just correcting, this is more like 35% not 50% when using DMA.
Hmm :)
1766/1460 = ~20%
>
> Thanks,
>
> -Joel
>
>
>
>
>
>> for large 8K blocks:
>>
>> Sample run on am33xx (beaglebone):
>> With DMA rewrite:
>> [ 26.410052] test 0 (128 bit key, 16 byte blocks): 4318 operations in 1 seconds (69088 bytes)
>> [ 27.414314] test 1 (128 bit key, 64 byte blocks): 4360 operations in 1 seconds (279040 bytes)
>> [ 28.414406] test 2 (128 bit key, 256 byte blocks): 3609 operations in 1 seconds (923904 bytes)
>> [ 29.414410] test 3 (128 bit key, 1024 byte blocks): 3418 operations in 1 seconds (3500032 bytes)
>> [ 30.414510] test 4 (128 bit key, 8192 byte blocks): 1766 operations in 1 seconds (14467072 bytes)
>>
>> Without DMA rewrite:
>> [ 31.920519] test 0 (128 bit key, 16 byte blocks): 4417 operations in 1 seconds (70672 bytes)
>> [ 32.925997] test 1 (128 bit key, 64 byte blocks): 4221 operations in 1 seconds (270144 bytes)
>> [ 33.926194] test 2 (128 bit key, 256 byte blocks): 3528 operations in 1 seconds (903168 bytes)
>> [ 34.926225] test 3 (128 bit key, 1024 byte blocks): 3281 operations in 1 seconds (3359744 bytes)
>> [ 35.926385] test 4 (128 bit key, 8192 byte blocks): 1460 operations in 1 seconds (11960320 bytes)
>>
>> With PIO mode, note the tremndous boost in performance for small blocks there:
>> [ 27.294905] test 0 (128 bit key, 16 byte blocks): 20585 operations in 1 seconds (329360 bytes)
>> [ 28.302282] test 1 (128 bit key, 64 byte blocks): 8106 operations in 1 seconds (518784 bytes)
>> [ 29.302374] test 2 (128 bit key, 256 byte blocks): 2359 operations in 1 seconds (603904 bytes)
>> [ 30.302575] test 3 (128 bit key, 1024 byte blocks): 605 operations in 1 seconds (619520 bytes)
>> [ 31.303781] test 4 (128 bit key, 8192 byte blocks): 79 operations in 1 seconds (647168 bytes)
>>
>> Future work in this direction would be to dynamically change between
>> PIO/DMA mode based on the block size.
>>
>> Joel Fernandes (10):
>> crypto: scatterwalk: Add support for calculating number of SG
>> elements
>> crypto: omap-aes: Add useful debug macros
>> crypto: omap-aes: Populate number of SG elements
>> crypto: omap-aes: Simplify DMA usage by using direct SGs
>> crypto: omap-aes: Sync SG before DMA operation
>> crypto: omap-aes: Remove previously used intermediate buffers
>> crypto: omap-aes: Add IRQ info and helper macros
>> crypto: omap-aes: PIO mode: Add IRQ handler and walk SGs
>> crypto: omap-aes: PIO mode: platform data for OMAP4 and trigger it
>> crypto: omap-aes: Switch to PIO mode in probe function
>>
>> crypto/scatterwalk.c | 22 +++
>> drivers/crypto/omap-aes.c | 400 ++++++++++++++++++++----------------------
>> include/crypto/scatterwalk.h | 2 +
>> 3 files changed, 217 insertions(+), 207 deletions(-)
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
WARNING: multiple messages have this Message-ID (diff)
From: d.kasatkin@samsung.com (Dmitry Kasatkin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/10] crypto: omap-aes: DMA and PIO mode improvements
Date: Thu, 15 Aug 2013 08:58:34 +0300 [thread overview]
Message-ID: <520C6E0A.8030505@samsung.com> (raw)
In-Reply-To: <520C1327.8090607@ti.com>
On 15/08/13 02:30, Joel Fernandes wrote:
> On 08/14/2013 06:12 PM, Joel Fernandes wrote:
>> This patch series is a rewrite of the DMA portion of omap-aes driver
>> and also adds support for PIO mode. Both these modes, give better
>> performance than before.
>>
>> Earlier, only a single SG was used for DMA purpose, and the SG-list
>> passed from the crypto layer was being copied and DMA'd one entry at
>> a time. This turns out to be quite inefficient, so we replace it with
>> much simpler code that directly passes the SG-list from crypto to the
>> DMA layer.
>>
>> We also add PIO mode support to the driver, and switch to PIO mode
>> whenever the DMA channel allocation is not available. This is only for
>> OMAP4 platform will work on any platform on which IRQ information is
>> populated.
>>
>> Tests performed on am33xx and omap4 SoCs , notice the 50% perf improvement
> Just correcting, this is more like 35% not 50% when using DMA.
Hmm :)
1766/1460 = ~20%
>
> Thanks,
>
> -Joel
>
>
>
>
>
>> for large 8K blocks:
>>
>> Sample run on am33xx (beaglebone):
>> With DMA rewrite:
>> [ 26.410052] test 0 (128 bit key, 16 byte blocks): 4318 operations in 1 seconds (69088 bytes)
>> [ 27.414314] test 1 (128 bit key, 64 byte blocks): 4360 operations in 1 seconds (279040 bytes)
>> [ 28.414406] test 2 (128 bit key, 256 byte blocks): 3609 operations in 1 seconds (923904 bytes)
>> [ 29.414410] test 3 (128 bit key, 1024 byte blocks): 3418 operations in 1 seconds (3500032 bytes)
>> [ 30.414510] test 4 (128 bit key, 8192 byte blocks): 1766 operations in 1 seconds (14467072 bytes)
>>
>> Without DMA rewrite:
>> [ 31.920519] test 0 (128 bit key, 16 byte blocks): 4417 operations in 1 seconds (70672 bytes)
>> [ 32.925997] test 1 (128 bit key, 64 byte blocks): 4221 operations in 1 seconds (270144 bytes)
>> [ 33.926194] test 2 (128 bit key, 256 byte blocks): 3528 operations in 1 seconds (903168 bytes)
>> [ 34.926225] test 3 (128 bit key, 1024 byte blocks): 3281 operations in 1 seconds (3359744 bytes)
>> [ 35.926385] test 4 (128 bit key, 8192 byte blocks): 1460 operations in 1 seconds (11960320 bytes)
>>
>> With PIO mode, note the tremndous boost in performance for small blocks there:
>> [ 27.294905] test 0 (128 bit key, 16 byte blocks): 20585 operations in 1 seconds (329360 bytes)
>> [ 28.302282] test 1 (128 bit key, 64 byte blocks): 8106 operations in 1 seconds (518784 bytes)
>> [ 29.302374] test 2 (128 bit key, 256 byte blocks): 2359 operations in 1 seconds (603904 bytes)
>> [ 30.302575] test 3 (128 bit key, 1024 byte blocks): 605 operations in 1 seconds (619520 bytes)
>> [ 31.303781] test 4 (128 bit key, 8192 byte blocks): 79 operations in 1 seconds (647168 bytes)
>>
>> Future work in this direction would be to dynamically change between
>> PIO/DMA mode based on the block size.
>>
>> Joel Fernandes (10):
>> crypto: scatterwalk: Add support for calculating number of SG
>> elements
>> crypto: omap-aes: Add useful debug macros
>> crypto: omap-aes: Populate number of SG elements
>> crypto: omap-aes: Simplify DMA usage by using direct SGs
>> crypto: omap-aes: Sync SG before DMA operation
>> crypto: omap-aes: Remove previously used intermediate buffers
>> crypto: omap-aes: Add IRQ info and helper macros
>> crypto: omap-aes: PIO mode: Add IRQ handler and walk SGs
>> crypto: omap-aes: PIO mode: platform data for OMAP4 and trigger it
>> crypto: omap-aes: Switch to PIO mode in probe function
>>
>> crypto/scatterwalk.c | 22 +++
>> drivers/crypto/omap-aes.c | 400 ++++++++++++++++++++----------------------
>> include/crypto/scatterwalk.h | 2 +
>> 3 files changed, 217 insertions(+), 207 deletions(-)
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2013-08-15 5:58 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 23:12 [PATCH 00/10] crypto: omap-aes: DMA and PIO mode improvements Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 01/10] crypto: scatterwalk: Add support for calculating number of SG elements Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 02/10] crypto: omap-aes: Add useful debug macros Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:29 ` Joe Perches
2013-08-14 23:29 ` Joe Perches
2013-08-14 23:40 ` Joel Fernandes
2013-08-14 23:40 ` Joel Fernandes
2013-08-15 0:47 ` Joe Perches
2013-08-15 0:47 ` Joe Perches
2013-08-15 3:12 ` Joel Fernandes
2013-08-15 3:12 ` Joel Fernandes
2013-08-15 3:12 ` Joel Fernandes
2013-08-15 6:23 ` Dmitry Kasatkin
2013-08-15 6:23 ` Dmitry Kasatkin
2013-08-15 7:27 ` Joel Fernandes
2013-08-15 7:27 ` Joel Fernandes
2013-08-15 7:27 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 03/10] crypto: omap-aes: Populate number of SG elements Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 04/10] crypto: omap-aes: Simplify DMA usage by using direct SGs Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 05/10] crypto: omap-aes: Sync SG before DMA operation Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 06/10] crypto: omap-aes: Remove previously used intermediate buffers Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 07/10] crypto: omap-aes: Add IRQ info and helper macros Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 08/10] crypto: omap-aes: PIO mode: Add IRQ handler and walk SGs Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 09/10] crypto: omap-aes: PIO mode: platform data for OMAP4 and trigger it Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:12 ` [PATCH 10/10] crypto: omap-aes: Switch to PIO mode in probe function Joel Fernandes
2013-08-14 23:12 ` Joel Fernandes
2013-08-14 23:30 ` [PATCH 00/10] crypto: omap-aes: DMA and PIO mode improvements Joel Fernandes
2013-08-14 23:30 ` Joel Fernandes
2013-08-15 5:58 ` Dmitry Kasatkin [this message]
2013-08-15 5:58 ` Dmitry Kasatkin
2013-08-15 7:02 ` Joel Fernandes
2013-08-15 7:02 ` Joel Fernandes
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=520C6E0A.8030505@samsung.com \
--to=d.kasatkin@samsung.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.hengli.com.au \
--cc=joelf@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lokeshvutla@ti.com \
--cc=mgreer@animalcreek.com \
--cc=rnayak@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.