linux-sg2042/lib/raid6
Zhengyuan Liu f591df3cc6 md/raid6: fix algorithm choice under larger PAGE_SIZE
There are several algorithms available for raid6 to generate xor and syndrome
parity, including basic int1, int2 ... int32 and SIMD optimized implementation
like sse and neon.  To test and choose the best algorithms at the initial
stage, we need provide enough disk data to feed the algorithms. However, the
disk number we provided depends on page size and gfmul table, seeing bellow:

    const int disks = (65536/PAGE_SIZE) + 2;

So when come to 64K PAGE_SIZE, there is only one data disk plus 2 parity disk,
as a result the chosed algorithm is not reliable. For example, on my arm64
machine with 64K page enabled, it will choose intx32 as the best one, although
the NEON implementation is better.

This patch tries to fix the problem by defining a constant raid6 disk number to
supporting arbitrary page size.

Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Zhengyuan Liu <liuzhengyuan@kylinos.cn>
Signed-off-by: Song Liu <songliubraving@fb.com>
2020-01-13 11:44:09 -08:00
..
test treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 83 2019-05-24 17:37:52 +02:00
.gitignore lib/raid6/altivec: Add vpermxor implementation for raid6 Q syndrome 2018-03-20 16:47:25 +11:00
Makefile lib/raid6: fix unnecessary rebuild of vpermxor*.c 2019-08-01 00:09:49 +09:00
algos.c md/raid6: fix algorithm choice under larger PAGE_SIZE 2020-01-13 11:44:09 -08:00
altivec.uc lib/raid6: Build proper raid6test files on powerpc 2018-03-20 16:47:52 +11:00
avx2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
avx512.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
int.uc md/raid6 algorithms: xor_syndrome() for generic int 2015-04-22 08:00:42 +10:00
mktables.c raid6/test: fix a compilation warning 2020-01-13 11:44:09 -08:00
mmx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
neon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
neon.uc lib/raid6: use vdupq_n_u8 to avoid endianness warnings 2019-02-28 17:44:51 +00:00
recov.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
recov_avx2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
recov_avx512.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
recov_neon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
recov_neon_inner.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
recov_s390xc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
recov_ssse3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
s390vx.uc RAID/s390: remove invalid 'r' inline asm operand modifier 2019-06-11 09:48:25 +02:00
sse1.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
sse2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
unroll.awk lib: raid6: fix awk build warnings 2019-12-09 18:55:03 +01:00
vpermxor.uc lib/raid6/altivec: Add vpermxor implementation for raid6 Q syndrome 2018-03-20 16:47:25 +11:00
x86.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00