diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-01-03 10:21:02 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-01-03 10:21:02 -0500 |
commit | dc629c211c65ee5c8f1c4976886d4a5f33f50674 (patch) | |
tree | 814343b7f638a942794f8aece71132eae8aded3a /lib/raid6 | |
parent | 645ff1e8e704c4f33ab1fcd3c87f95cb9b6d7144 (diff) | |
parent | e820d55cb99dd93ac2dc949cf486bb187e5cd70d (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md into for-linus
Pull the pending 4.21 changes for md from Shaohua.
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
md: fix raid10 hang issue caused by barrier
raid10: refactor common wait code from regular read/write request
md: remvoe redundant condition check
lib/raid6: add option to skip algo benchmarking
lib/raid6: sort algos in rough performance order
lib/raid6: check for assembler SSSE3 support
lib/raid6: avoid __attribute_const__ redefinition
lib/raid6: add missing include for raid6test
md: remove set but not used variable 'bi_rdev'
Diffstat (limited to 'lib/raid6')
-rw-r--r-- | lib/raid6/algos.c | 81 | ||||
-rw-r--r-- | lib/raid6/test/Makefile | 3 |
2 files changed, 46 insertions, 38 deletions
diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c index 5065b1e7e327..7e4f7a8ffa8e 100644 --- a/lib/raid6/algos.c +++ b/lib/raid6/algos.c | |||
@@ -34,64 +34,64 @@ struct raid6_calls raid6_call; | |||
34 | EXPORT_SYMBOL_GPL(raid6_call); | 34 | EXPORT_SYMBOL_GPL(raid6_call); |
35 | 35 | ||
36 | const struct raid6_calls * const raid6_algos[] = { | 36 | const struct raid6_calls * const raid6_algos[] = { |
37 | #if defined(__ia64__) | ||
38 | &raid6_intx16, | ||
39 | &raid6_intx32, | ||
40 | #endif | ||
41 | #if defined(__i386__) && !defined(__arch_um__) | 37 | #if defined(__i386__) && !defined(__arch_um__) |
42 | &raid6_mmxx1, | ||
43 | &raid6_mmxx2, | ||
44 | &raid6_sse1x1, | ||
45 | &raid6_sse1x2, | ||
46 | &raid6_sse2x1, | ||
47 | &raid6_sse2x2, | ||
48 | #ifdef CONFIG_AS_AVX2 | ||
49 | &raid6_avx2x1, | ||
50 | &raid6_avx2x2, | ||
51 | #endif | ||
52 | #ifdef CONFIG_AS_AVX512 | 38 | #ifdef CONFIG_AS_AVX512 |
53 | &raid6_avx512x1, | ||
54 | &raid6_avx512x2, | 39 | &raid6_avx512x2, |
40 | &raid6_avx512x1, | ||
55 | #endif | 41 | #endif |
56 | #endif | ||
57 | #if defined(__x86_64__) && !defined(__arch_um__) | ||
58 | &raid6_sse2x1, | ||
59 | &raid6_sse2x2, | ||
60 | &raid6_sse2x4, | ||
61 | #ifdef CONFIG_AS_AVX2 | 42 | #ifdef CONFIG_AS_AVX2 |
62 | &raid6_avx2x1, | ||
63 | &raid6_avx2x2, | 43 | &raid6_avx2x2, |
64 | &raid6_avx2x4, | 44 | &raid6_avx2x1, |
45 | #endif | ||
46 | &raid6_sse2x2, | ||
47 | &raid6_sse2x1, | ||
48 | &raid6_sse1x2, | ||
49 | &raid6_sse1x1, | ||
50 | &raid6_mmxx2, | ||
51 | &raid6_mmxx1, | ||
65 | #endif | 52 | #endif |
53 | #if defined(__x86_64__) && !defined(__arch_um__) | ||
66 | #ifdef CONFIG_AS_AVX512 | 54 | #ifdef CONFIG_AS_AVX512 |
67 | &raid6_avx512x1, | ||
68 | &raid6_avx512x2, | ||
69 | &raid6_avx512x4, | 55 | &raid6_avx512x4, |
56 | &raid6_avx512x2, | ||
57 | &raid6_avx512x1, | ||
70 | #endif | 58 | #endif |
59 | #ifdef CONFIG_AS_AVX2 | ||
60 | &raid6_avx2x4, | ||
61 | &raid6_avx2x2, | ||
62 | &raid6_avx2x1, | ||
63 | #endif | ||
64 | &raid6_sse2x4, | ||
65 | &raid6_sse2x2, | ||
66 | &raid6_sse2x1, | ||
71 | #endif | 67 | #endif |
72 | #ifdef CONFIG_ALTIVEC | 68 | #ifdef CONFIG_ALTIVEC |
73 | &raid6_altivec1, | ||
74 | &raid6_altivec2, | ||
75 | &raid6_altivec4, | ||
76 | &raid6_altivec8, | ||
77 | &raid6_vpermxor1, | ||
78 | &raid6_vpermxor2, | ||
79 | &raid6_vpermxor4, | ||
80 | &raid6_vpermxor8, | 69 | &raid6_vpermxor8, |
70 | &raid6_vpermxor4, | ||
71 | &raid6_vpermxor2, | ||
72 | &raid6_vpermxor1, | ||
73 | &raid6_altivec8, | ||
74 | &raid6_altivec4, | ||
75 | &raid6_altivec2, | ||
76 | &raid6_altivec1, | ||
81 | #endif | 77 | #endif |
82 | #if defined(CONFIG_S390) | 78 | #if defined(CONFIG_S390) |
83 | &raid6_s390vx8, | 79 | &raid6_s390vx8, |
84 | #endif | 80 | #endif |
85 | &raid6_intx1, | ||
86 | &raid6_intx2, | ||
87 | &raid6_intx4, | ||
88 | &raid6_intx8, | ||
89 | #ifdef CONFIG_KERNEL_MODE_NEON | 81 | #ifdef CONFIG_KERNEL_MODE_NEON |
90 | &raid6_neonx1, | ||
91 | &raid6_neonx2, | ||
92 | &raid6_neonx4, | ||
93 | &raid6_neonx8, | 82 | &raid6_neonx8, |
83 | &raid6_neonx4, | ||
84 | &raid6_neonx2, | ||
85 | &raid6_neonx1, | ||
94 | #endif | 86 | #endif |
87 | #if defined(__ia64__) | ||
88 | &raid6_intx32, | ||
89 | &raid6_intx16, | ||
90 | #endif | ||
91 | &raid6_intx8, | ||
92 | &raid6_intx4, | ||
93 | &raid6_intx2, | ||
94 | &raid6_intx1, | ||
95 | NULL | 95 | NULL |
96 | }; | 96 | }; |
97 | 97 | ||
@@ -163,6 +163,11 @@ static inline const struct raid6_calls *raid6_choose_gen( | |||
163 | if ((*algo)->valid && !(*algo)->valid()) | 163 | if ((*algo)->valid && !(*algo)->valid()) |
164 | continue; | 164 | continue; |
165 | 165 | ||
166 | if (!IS_ENABLED(CONFIG_RAID6_PQ_BENCHMARK)) { | ||
167 | best = *algo; | ||
168 | break; | ||
169 | } | ||
170 | |||
166 | perf = 0; | 171 | perf = 0; |
167 | 172 | ||
168 | preempt_disable(); | 173 | preempt_disable(); |
diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile index 79777645cac9..3ab8720aa2f8 100644 --- a/lib/raid6/test/Makefile +++ b/lib/raid6/test/Makefile | |||
@@ -34,6 +34,9 @@ endif | |||
34 | 34 | ||
35 | ifeq ($(IS_X86),yes) | 35 | ifeq ($(IS_X86),yes) |
36 | OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o avx512.o recov_avx512.o | 36 | OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o avx512.o recov_avx512.o |
37 | CFLAGS += $(shell echo "pshufb %xmm0, %xmm0" | \ | ||
38 | gcc -c -x assembler - >&/dev/null && \ | ||
39 | rm ./-.o && echo -DCONFIG_AS_SSSE3=1) | ||
37 | CFLAGS += $(shell echo "vpbroadcastb %xmm0, %ymm1" | \ | 40 | CFLAGS += $(shell echo "vpbroadcastb %xmm0, %ymm1" | \ |
38 | gcc -c -x assembler - >&/dev/null && \ | 41 | gcc -c -x assembler - >&/dev/null && \ |
39 | rm ./-.o && echo -DCONFIG_AS_AVX2=1) | 42 | rm ./-.o && echo -DCONFIG_AS_AVX2=1) |