]> asedeno.scripts.mit.edu Git - linux.git/commit
arm64: crypto: increase AES interleave to 4x
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 19 Feb 2015 17:25:16 +0000 (17:25 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 26 Feb 2015 18:31:46 +0000 (18:31 +0000)
commit0eee0fbd41c7b57d01136df2519c92ec1506e333
tree8b1c7d0f1b1bcdb805d8995556e00b7e59de57b9
parent6910fa16dbe142f6a0fd0fd7c249f9883ff7fc8a
arm64: crypto: increase AES interleave to 4x

This patch increases the interleave factor for parallel AES modes
to 4x. This improves performance on Cortex-A57 by ~35%. This is
due to the 3-cycle latency of AES instructions on the A57's
relatively deep pipeline (compared to Cortex-A53 where the AES
instruction latency is only 2 cycles).

At the same time, disable inline expansion of the core AES functions,
as the performance benefit of this feature is negligible.

  Measured on AMD Seattle (using tcrypt.ko mode=500 sec=1):

  Baseline (2x interleave, inline expansion)
  ------------------------------------------
  testing speed of async cbc(aes) (cbc-aes-ce) decryption
  test 4 (128 bit key, 8192 byte blocks): 95545 operations in 1 seconds
  test 14 (256 bit key, 8192 byte blocks): 68496 operations in 1 seconds

  This patch (4x interleave, no inline expansion)
  -----------------------------------------------
  testing speed of async cbc(aes) (cbc-aes-ce) decryption
  test 4 (128 bit key, 8192 byte blocks): 124735 operations in 1 seconds
  test 14 (256 bit key, 8192 byte blocks): 92328 operations in 1 seconds

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/crypto/Makefile