summaryrefslogtreecommitdiffstats
path: root/lib/raid6/algos.c
diff options
context:
space:
mode:
authorGayatri Kammela <gayatri.kammela@intel.com>2016-08-12 18:03:19 -0700
committerShaohua Li <shli@fb.com>2016-09-21 09:09:44 -0700
commite0a491c1296874a1aca51cc68452f12a4d950029 (patch)
treed69949fe4db93fc1cc886fa359b8a7c58f4f3021 /lib/raid6/algos.c
parentd6385db94196b253ae5eb3678fa95cdf1f839fcc (diff)
downloadlinux-e0a491c1296874a1aca51cc68452f12a4d950029.tar.gz
linux-e0a491c1296874a1aca51cc68452f12a4d950029.tar.bz2
linux-e0a491c1296874a1aca51cc68452f12a4d950029.zip
lib/raid6: Add AVX512 optimized gen_syndrome functions
Optimize RAID6 gen_syndrom functions to take advantage of the 512-bit ZMM integer instructions introduced in AVX512. AVX512 optimized gen_syndrom functions, which is simply based on avx2.c written by Yuanhan Liu and sse2.c written by hpa. The patch was tested and benchmarked before submission on a hardware that has AVX512 flags to support such instructions Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jim Kukunas <james.t.kukunas@linux.intel.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>
Diffstat (limited to 'lib/raid6/algos.c')
-rw-r--r--lib/raid6/algos.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c
index 975c6e0434bd..f5f090c52dd9 100644
--- a/lib/raid6/algos.c
+++ b/lib/raid6/algos.c
@@ -49,6 +49,10 @@ const struct raid6_calls * const raid6_algos[] = {
&raid6_avx2x1,
&raid6_avx2x2,
#endif
+#ifdef CONFIG_AS_AVX512
+ &raid6_avx512x1,
+ &raid6_avx512x2,
+#endif
#endif
#if defined(__x86_64__) && !defined(__arch_um__)
&raid6_sse2x1,
@@ -59,6 +63,11 @@ const struct raid6_calls * const raid6_algos[] = {
&raid6_avx2x2,
&raid6_avx2x4,
#endif
+#ifdef CONFIG_AS_AVX512
+ &raid6_avx512x1,
+ &raid6_avx512x2,
+ &raid6_avx512x4,
+#endif
#endif
#ifdef CONFIG_ALTIVEC
&raid6_altivec1,