summaryrefslogtreecommitdiffstats
path: root/lib/raid6/Makefile
diff options
context:
space:
mode:
authorWANG Xuerui <git@xen0n.name>2023-09-06 16:53:55 +0200
committerHuacai Chen <chenhuacai@loongson.cn>2023-09-06 16:53:55 +0200
commit8f3f06dfd6873135068ccf1a0b386308e8c4da38 (patch)
tree673e2390b8570c322e45a41195f5d165c482ad11 /lib/raid6/Makefile
parentLoongArch: Add SIMD-optimized XOR routines (diff)
downloadlinux-8f3f06dfd6873135068ccf1a0b386308e8c4da38.tar.xz
linux-8f3f06dfd6873135068ccf1a0b386308e8c4da38.zip
raid6: Add LoongArch SIMD syndrome calculation
The algorithms work on 64 bytes at a time, which is the L1 cache line size of all current and future LoongArch cores (that we care about), as confirmed by Huacai. The code is based on the generic int.uc algorithm, unrolled 4 times for LSX and 2 times for LASX. Further unrolling does not meaningfully improve the performance according to experiments. Performance numbers measured during system boot on a 3A5000 @ 2.5GHz: > raid6: lasx gen() 12726 MB/s > raid6: lsx gen() 10001 MB/s > raid6: int64x8 gen() 2876 MB/s > raid6: int64x4 gen() 3867 MB/s > raid6: int64x2 gen() 2531 MB/s > raid6: int64x1 gen() 1945 MB/s Comparison of xor() speeds (from different boots but meaningful anyway): > lasx: 11226 MB/s > lsx: 6395 MB/s > int64x4: 2147 MB/s Performance as measured by raid6test: > raid6: lasx gen() 25109 MB/s > raid6: lsx gen() 13233 MB/s > raid6: int64x8 gen() 4164 MB/s > raid6: int64x4 gen() 6005 MB/s > raid6: int64x2 gen() 5781 MB/s > raid6: int64x1 gen() 4119 MB/s > raid6: using algorithm lasx gen() 25109 MB/s > raid6: .... xor() 14439 MB/s, rmw enabled Acked-by: Song Liu <song@kernel.org> Signed-off-by: WANG Xuerui <git@xen0n.name> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'lib/raid6/Makefile')
-rw-r--r--lib/raid6/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile
index 45e17619422b..2b9ebe105480 100644
--- a/lib/raid6/Makefile
+++ b/lib/raid6/Makefile
@@ -9,6 +9,7 @@ raid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o \
vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o
raid6_pq-$(CONFIG_KERNEL_MODE_NEON) += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o
raid6_pq-$(CONFIG_S390) += s390vx8.o recov_s390xc.o
+raid6_pq-$(CONFIG_LOONGARCH) += loongarch_simd.o
hostprogs += mktables