android_kernel_oneplus_msm8998/drivers/crypto/amcc
Christian Lamparter d7ae9928a2 crypto: crypto4xx - increase context and scatter ring buffer elements
[ Upstream commit 778f81d6cdb7d25360f082ac0384d5103f04eca5 ]

If crypto4xx is used in conjunction with dm-crypt, the available
ring buffer elements are not enough to handle the load properly.

On an aes-cbc-essiv:sha256 encrypted swap partition the read
performance is abyssal: (tested with hdparm -t)

/dev/mapper/swap_crypt:
 Timing buffered disk reads:  14 MB in  3.68 seconds =   3.81 MB/sec

The patch increases both PPC4XX_NUM_SD and PPC4XX_NUM_PD to 256.
This improves the performance considerably:

/dev/mapper/swap_crypt:
 Timing buffered disk reads: 104 MB in  3.03 seconds =  34.31 MB/sec

Furthermore, PPC4XX_LAST_SD, PPC4XX_LAST_GD and PPC4XX_LAST_PD
can be easily calculated from their respective PPC4XX_NUM_*
constant.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-25 14:22:14 +01:00
..
crypto4xx_alg.c crypto: crypto4xx - Staticize local symbols 2013-08-14 20:42:03 +10:00
crypto4xx_core.c crypto: amcc - replace get_sg_count by sg_nents_for_len 2015-09-21 23:05:53 +08:00
crypto4xx_core.h crypto: crypto4xx - increase context and scatter ring buffer elements 2017-12-25 14:22:14 +01:00
crypto4xx_reg_def.h fix typos concerning "initiali[zs]e" 2010-06-16 18:05:05 +02:00
crypto4xx_sa.c crypto: amcc - Remove unused function 2015-01-05 21:36:07 +11:00
crypto4xx_sa.h Fix common misspellings 2011-03-31 11:26:23 -03:00
Makefile crypto: Makefile - replace the use of <module>-objs with <module>-y 2010-10-19 20:52:26 +08:00