md/raid6: use faster multiplication for ARM NEON delta syndrome
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 13 Jul 2017 17:16:00 +0000 (18:16 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 9 Aug 2017 17:51:57 +0000 (18:51 +0100)
commit35129dde88afad07f54b332d4f9eda2d254b80f2
tree9d9d78d7f3534ac9806ae3189b0273e05be77916
parentf39c3f9b10513dc9cb8a760a74a8141383c7046e
md/raid6: use faster multiplication for ARM NEON delta syndrome

The P/Q left side optimization in the delta syndrome simply involves
repeatedly multiplying a value by polynomial 'x' in GF(2^8). Given
that 'x * x * x * x' equals 'x^4' even in the polynomial world, we
can accelerate this substantially by performing up to 4 such operations
at once, using the NEON instructions for polynomial multiplication.

Results on a Cortex-A57 running in 64-bit mode:

  Before:
  -------
  raid6: neonx1   xor()  1680 MB/s
  raid6: neonx2   xor()  2286 MB/s
  raid6: neonx4   xor()  3162 MB/s
  raid6: neonx8   xor()  3389 MB/s

  After:
  ------
  raid6: neonx1   xor()  2281 MB/s
  raid6: neonx2   xor()  3362 MB/s
  raid6: neonx4   xor()  3787 MB/s
  raid6: neonx8   xor()  4239 MB/s

While we're at it, simplify MASK() by using a signed shift rather than
a vector compare involving a temp register.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
lib/raid6/neon.uc