From: Kevin Hilman <khilman@linaro.org>
To: Joel A Fernandes <joelagnel@ti.com>
Cc: <linux-crypto@vger.kernel.org>, <linux-omap@vger.kernel.org>,
Herbert Xu <herbert@gondor.hengli.com.au>
Subject: Re: [PATCH v2] OMAP: AES: Don't idle/start AES device between Encrypt operations
Date: Wed, 29 May 2013 09:39:05 -0700 [thread overview]
Message-ID: <878v2x91w6.fsf@linaro.org> (raw)
In-Reply-To: <1369785775-3737-1-git-send-email-joelagnel@ti.com> (Joel A. Fernandes's message of "Tue, 28 May 2013 19:02:55 -0500")
Joel A Fernandes <joelagnel@ti.com> writes:
> Calling runtime PM API for every block causes serious perf hit to
> crypto operations that are done on a long buffer.
> As crypto is performed on a page boundary, encrypting large buffers can
> cause a series of crypto operations divided by page. The runtime PM API
> is also called those many times.
>
> We call runtime_pm_get_sync only at beginning on the session (cra_init)
> and runtime_pm_put at the end. This result in upto a 50% speedup as below.
> This doesn't make the driver to keep the system awake as runtime get/put
> is only called during a crypto session which completes usually quickly.
>
> Before:
> root@beagleboard:~# time -v openssl speed -evp aes-128-cbc
> Doing aes-128-cbc for 3s on 16 size blocks: 13310 aes-128-cbc's in 0.01s
> Doing aes-128-cbc for 3s on 64 size blocks: 13040 aes-128-cbc's in 0.04s
> Doing aes-128-cbc for 3s on 256 size blocks: 9134 aes-128-cbc's in 0.03s
> Doing aes-128-cbc for 3s on 1024 size blocks: 8939 aes-128-cbc's in 0.01s
> Doing aes-128-cbc for 3s on 8192 size blocks: 4299 aes-128-cbc's in 0.00s
>
> After:
> root@beagleboard:~# time -v openssl speed -evp aes-128-cbc
> Doing aes-128-cbc for 3s on 16 size blocks: 18911 aes-128-cbc's in 0.02s
> Doing aes-128-cbc for 3s on 64 size blocks: 18878 aes-128-cbc's in 0.02s
> Doing aes-128-cbc for 3s on 256 size blocks: 11878 aes-128-cbc's in 0.10s
> Doing aes-128-cbc for 3s on 1024 size blocks: 11538 aes-128-cbc's in 0.05s
> Doing aes-128-cbc for 3s on 8192 size blocks: 4857 aes-128-cbc's in 0.03s
>
> While at it, also drop enter and exit pr_debugs, in related code. tracers
> can be used for that.
>
> Tested on a Beaglebone (AM335x SoC) board.
>
> v3 changes:
> Refreshed patch on kernel v3.10-rc3
>
> Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
This patch had at least 2 acks (myself and Mark Greer) which you should
include when reposting.
Also, changelog says v3 but subject says v2.
Kevin
WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@linaro.org>
To: Joel A Fernandes <joelagnel@ti.com>
Cc: linux-crypto@vger.kernel.org, linux-omap@vger.kernel.org,
Herbert Xu <herbert@gondor.hengli.com.au>
Subject: Re: [PATCH v2] OMAP: AES: Don't idle/start AES device between Encrypt operations
Date: Wed, 29 May 2013 09:39:05 -0700 [thread overview]
Message-ID: <878v2x91w6.fsf@linaro.org> (raw)
In-Reply-To: <1369785775-3737-1-git-send-email-joelagnel@ti.com> (Joel A. Fernandes's message of "Tue, 28 May 2013 19:02:55 -0500")
Joel A Fernandes <joelagnel@ti.com> writes:
> Calling runtime PM API for every block causes serious perf hit to
> crypto operations that are done on a long buffer.
> As crypto is performed on a page boundary, encrypting large buffers can
> cause a series of crypto operations divided by page. The runtime PM API
> is also called those many times.
>
> We call runtime_pm_get_sync only at beginning on the session (cra_init)
> and runtime_pm_put at the end. This result in upto a 50% speedup as below.
> This doesn't make the driver to keep the system awake as runtime get/put
> is only called during a crypto session which completes usually quickly.
>
> Before:
> root@beagleboard:~# time -v openssl speed -evp aes-128-cbc
> Doing aes-128-cbc for 3s on 16 size blocks: 13310 aes-128-cbc's in 0.01s
> Doing aes-128-cbc for 3s on 64 size blocks: 13040 aes-128-cbc's in 0.04s
> Doing aes-128-cbc for 3s on 256 size blocks: 9134 aes-128-cbc's in 0.03s
> Doing aes-128-cbc for 3s on 1024 size blocks: 8939 aes-128-cbc's in 0.01s
> Doing aes-128-cbc for 3s on 8192 size blocks: 4299 aes-128-cbc's in 0.00s
>
> After:
> root@beagleboard:~# time -v openssl speed -evp aes-128-cbc
> Doing aes-128-cbc for 3s on 16 size blocks: 18911 aes-128-cbc's in 0.02s
> Doing aes-128-cbc for 3s on 64 size blocks: 18878 aes-128-cbc's in 0.02s
> Doing aes-128-cbc for 3s on 256 size blocks: 11878 aes-128-cbc's in 0.10s
> Doing aes-128-cbc for 3s on 1024 size blocks: 11538 aes-128-cbc's in 0.05s
> Doing aes-128-cbc for 3s on 8192 size blocks: 4857 aes-128-cbc's in 0.03s
>
> While at it, also drop enter and exit pr_debugs, in related code. tracers
> can be used for that.
>
> Tested on a Beaglebone (AM335x SoC) board.
>
> v3 changes:
> Refreshed patch on kernel v3.10-rc3
>
> Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
This patch had at least 2 acks (myself and Mark Greer) which you should
include when reposting.
Also, changelog says v3 but subject says v2.
Kevin
next prev parent reply other threads:[~2013-05-29 16:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 0:02 [PATCH v2] OMAP: AES: Don't idle/start AES device between Encrypt operations Joel A Fernandes
2013-05-29 0:02 ` Joel A Fernandes
2013-05-29 16:39 ` Kevin Hilman [this message]
2013-05-29 16:39 ` Kevin Hilman
2013-06-05 8:53 ` Herbert Xu
-- strict thread matches above, loose matches on Subject: below --
2013-05-14 3:07 Joel A Fernandes
2013-05-14 3:07 ` Joel A Fernandes
2013-05-14 14:11 ` Kevin Hilman
2013-05-14 14:11 ` Kevin Hilman
2013-05-17 21:14 ` Mark A. Greer
2013-05-28 7:42 ` 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=878v2x91w6.fsf@linaro.org \
--to=khilman@linaro.org \
--cc=herbert@gondor.hengli.com.au \
--cc=joelagnel@ti.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
/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.