Skip to content

Commit 13c520b

Browse files
gkammelashligit
authored andcommitted
lib/raid6: Add AVX512 optimized recovery functions
Optimize RAID6 recovery functions to take advantage of the 512-bit ZMM integer instructions introduced in AVX512. AVX512 optimized recovery functions, which is simply based on recov_avx2.c written by Jim Kukunas This patch was tested and benchmarked before submission on a hardware that has AVX512 flags to support such instructions Cc: Jim Kukunas <james.t.kukunas@linux.intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Megha Dey <megha.dey@linux.intel.com> Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com> Reviewed-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Shaohua Li <shli@fb.com>
1 parent e0a491c commit 13c520b

4 files changed

Lines changed: 393 additions & 1 deletion

File tree

‎include/linux/raid/pq.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ struct raid6_recov_calls {
118118
extern const struct raid6_recov_calls raid6_recov_intx1;
119119
extern const struct raid6_recov_calls raid6_recov_ssse3;
120120
extern const struct raid6_recov_calls raid6_recov_avx2;
121+
extern const struct raid6_recov_calls raid6_recov_avx512;
121122

122123
extern const struct raid6_calls raid6_neonx1;
123124
extern const struct raid6_calls raid6_neonx2;

‎lib/raid6/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ obj-$(CONFIG_RAID6_PQ) += raid6_pq.o
33
raid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \
44
int8.o int16.o int32.o
55

6-
raid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o avx512.o
6+
raid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o avx512.o recov_avx512.o
77
raid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o
88
raid6_pq-$(CONFIG_KERNEL_MODE_NEON) += neon.o neon1.o neon2.o neon4.o neon8.o
99
raid6_pq-$(CONFIG_TILEGX) += tilegx8.o

‎lib/raid6/algos.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ void (*raid6_datap_recov)(int, size_t, int, void **);
9898
EXPORT_SYMBOL_GPL(raid6_datap_recov);
9999

100100
const struct raid6_recov_calls *const raid6_recov_algos[] = {
101+
#ifdef CONFIG_AS_AVX512
102+
&raid6_recov_avx512,
103+
#endif
101104
#ifdef CONFIG_AS_AVX2
102105
&raid6_recov_avx2,
103106
#endif

0 commit comments

Comments
 (0)