From 35a76a0366372d89a0f1ac3cebd5bc7646aadec3 Mon Sep 17 00:00:00 2001 From: "Tyler J. Stachecki" Date: Thu, 23 Jun 2016 23:32:40 -0400 Subject: Implementation of SSE optimized Fletcher-4 Builds off of 1eeb4562 (Implementation of AVX2 optimized Fletcher-4) This commit adds another implementation of the Fletcher-4 algorithm. It is automatically selected at module load if it benchmarks higher than all other available implementations. The module benchmark was also amended to analyze the performance of the byteswap-ed version of Fletcher-4, as well as the non-byteswaped version. The average performance of the two is used to select the the fastest implementation available on the host system. Adds a pair of fields to an existing zcommon module parameter: - zfs_fletcher_4_impl (str) "sse2" - new SSE2 implementation if available "ssse3" - new SSSE3 implementation if available Signed-off-by: Tyler J. Stachecki Signed-off-by: Gvozden Neskovic Signed-off-by: Brian Behlendorf Closes #4789 --- include/zfs_fletcher.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/zfs_fletcher.h b/include/zfs_fletcher.h index 4ccb4a2f4..afc3936c0 100644 --- a/include/zfs_fletcher.h +++ b/include/zfs_fletcher.h @@ -61,6 +61,14 @@ typedef struct fletcher_4_func { const char *name; } fletcher_4_ops_t; +#if defined(HAVE_SSE2) +extern const fletcher_4_ops_t fletcher_4_sse2_ops; +#endif + +#if defined(HAVE_SSE2) && defined(HAVE_SSSE3) +extern const fletcher_4_ops_t fletcher_4_ssse3_ops; +#endif + #if defined(HAVE_AVX) && defined(HAVE_AVX2) extern const fletcher_4_ops_t fletcher_4_avx2_ops; #endif -- cgit v1.2.3