diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2018-11-12 18:26:51 -0500 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2018-12-20 11:53:23 -0500 |
commit | 0437de4fa09fe59b57d12b785e4afb73b0f34c05 (patch) | |
tree | 62790298d1b4b31fc33ac70a3bc224abfadeeeed /lib/raid6/algos.c | |
parent | 86919f9dd2dbb88bbbe4e381dc8e6b9e9a1b9eb5 (diff) |
lib/raid6: sort algos in rough performance order
Sort the list of RAID6 algorithms in roughly decreasing order of
expected performance: newer instruction sets first (within each
architecture) and wider unrollings first.
This doesn't make any difference right now, since all functions are
benchmarked; a follow-up change will make use of this by optionally
choosing the first valid function rather than testing all of them.
The Itanium raid6_intx{16,32} entries are also moved down to be near the
other raid6_intx entries for clarity.
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'lib/raid6/algos.c')
-rw-r--r-- | lib/raid6/algos.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c index 5065b1e7e327..a753ff56670f 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, |
65 | #endif | 45 | #endif |
46 | &raid6_sse2x2, | ||
47 | &raid6_sse2x1, | ||
48 | &raid6_sse1x2, | ||
49 | &raid6_sse1x1, | ||
50 | &raid6_mmxx2, | ||
51 | &raid6_mmxx1, | ||
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, | ||
58 | #endif | ||
59 | #ifdef CONFIG_AS_AVX2 | ||
60 | &raid6_avx2x4, | ||
61 | &raid6_avx2x2, | ||
62 | &raid6_avx2x1, | ||
70 | #endif | 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, | ||
86 | #endif | ||
87 | #if defined(__ia64__) | ||
88 | &raid6_intx32, | ||
89 | &raid6_intx16, | ||
94 | #endif | 90 | #endif |
91 | &raid6_intx8, | ||
92 | &raid6_intx4, | ||
93 | &raid6_intx2, | ||
94 | &raid6_intx1, | ||
95 | NULL | 95 | NULL |
96 | }; | 96 | }; |
97 | 97 | ||