linux-kernel-test/drivers/crypto
Joel A Fernandes a3485e685f crypto: omap-aes - Don't idle/start AES device between Encrypt operations
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.

Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-06-05 16:43:05 +08:00
..
amcc crypto: crypto4xx - fix error return code 2012-09-27 13:32:15 +08:00
caam crypto: caam - add missing flag for the LOAD/STORE commands 2013-05-28 15:37:08 +08:00
nx Drivers: crypto: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
ux500 crypto: ux500 - Cocci spatch "resource_size.spatch" 2013-05-28 17:14:15 +08:00
atmel-aes-regs.h crypto: atmel - add Atmel AES driver 2012-07-11 11:07:40 +08:00
atmel-aes.c crypto: atmel-aes - add support for latest release of the IP (0x130) 2013-03-10 16:46:42 +08:00
atmel-sha-regs.h crypto: atmel-sha - add support for latest release of the IP (0x410) 2013-03-10 16:46:42 +08:00
atmel-sha.c crypto: atmel-sha - add support for latest release of the IP (0x410) 2013-03-10 16:46:42 +08:00
atmel-tdes-regs.h crypto: atmel-tdes - add support for latest release of the IP (0x700) 2013-03-10 16:46:42 +08:00
atmel-tdes.c crypto: atmel-tdes - add support for latest release of the IP (0x700) 2013-03-10 16:46:42 +08:00
bfin_crc.c crypto: bfin_crc - Fix possible NULL pointer dereference 2013-03-10 16:46:43 +08:00
dcp.c crypto: dcp - Added support for Freescale's DCP co-processor 2013-05-28 15:43:03 +08:00
geode-aes.c Drivers: crypto: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
geode-aes.h
hifn_795x.c crypto: hifn_795x - Pass correct pointer to free_irq() 2013-05-28 15:43:04 +08:00
ixp4xx_crypto.c IXP4xx crypto: MOD_AES{128,192,256} already include key size. 2012-11-22 03:36:15 +00:00
Kconfig crypto: dcp - Added support for Freescale's DCP co-processor 2013-05-28 15:43:03 +08:00
Makefile crypto: dcp - Added support for Freescale's DCP co-processor 2013-05-28 15:43:03 +08:00
mv_cesa.c crypto: mv_cesa: Remove redundant platform_set_drvdata() 2013-05-24 17:55:28 +08:00
mv_cesa.h crypto: mv_cesa - Add sha1 and hmac(sha1) async hash drivers 2010-04-13 16:50:49 +08:00
n2_asm.S crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
n2_core.c Drivers: crypto: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
n2_core.h crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
omap-aes.c crypto: omap-aes - Don't idle/start AES device between Encrypt operations 2013-06-05 16:43:05 +08:00
omap-sham.c drivers: crypto: use devm_ioremap_resource() 2013-05-24 17:55:28 +08:00
padlock-aes.c crypto: drivers - remove cra_list initialization 2012-08-01 17:47:28 +08:00
padlock-sha.c crypto: Add support for x86 cpuid auto loading for x86 crypto drivers 2012-01-26 16:48:10 -08:00
picoxcell_crypto_regs.h crypto: picoxcell - add support for the picoxcell crypto engines 2011-02-21 22:42:40 +11:00
picoxcell_crypto.c crypto: picoxcell - Use of_match_ptr() macro 2013-03-22 18:13:55 +08:00
s5p-sss.c crypto: s5p-sss: Remove redundant platform_set_drvdata() 2013-05-24 17:55:28 +08:00
sahara.c crypto: sahara - Add driver for SAHARA2 accelerator. 2013-03-21 17:44:41 +08:00
talitos.c Revert "crypto: talitos - add IPsec ESN support" 2013-03-21 17:36:02 +08:00
talitos.h crypto: talitos - add sha224, sha384 and sha512 to existing AEAD algorithms 2012-07-11 11:08:29 +08:00
tegra-aes.c Drivers: crypto: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
tegra-aes.h crypto: driver for Tegra AES hardware 2012-01-13 16:38:37 +11:00