mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add superscalar fletcher4
This is the Fletcher4 algorithm implemented in pure C, but using multiple counters using algorithms identical to those used for SSE/NEON and AVX2. This allows for faster execution on core with strong superscalar capabilities but weak SIMD capabilities. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Romain Dolbeau <romain.dolbeau@atos.net> Closes #5317
This commit is contained in:
committed by
Brian Behlendorf
parent
ace1eae84c
commit
7f3194932d
@@ -65,6 +65,10 @@ void fletcher_4_fini(void);
|
||||
|
||||
/* Internal fletcher ctx */
|
||||
|
||||
typedef struct zfs_fletcher_superscalar {
|
||||
uint64_t v[4];
|
||||
} zfs_fletcher_superscalar_t;
|
||||
|
||||
typedef struct zfs_fletcher_sse {
|
||||
uint64_t v[2] __attribute__((aligned(16)));
|
||||
} zfs_fletcher_sse_t;
|
||||
@@ -84,6 +88,7 @@ typedef struct zfs_fletcher_aarch64_neon {
|
||||
|
||||
typedef union fletcher_4_ctx {
|
||||
zio_cksum_t scalar;
|
||||
zfs_fletcher_superscalar_t superscalar[4];
|
||||
|
||||
#if defined(HAVE_SSE2) || (defined(HAVE_SSE2) && defined(HAVE_SSSE3))
|
||||
zfs_fletcher_sse_t sse[4];
|
||||
@@ -118,6 +123,8 @@ typedef struct fletcher_4_func {
|
||||
const char *name;
|
||||
} fletcher_4_ops_t;
|
||||
|
||||
extern const fletcher_4_ops_t fletcher_4_superscalar_ops;
|
||||
extern const fletcher_4_ops_t fletcher_4_superscalar4_ops;
|
||||
|
||||
#if defined(HAVE_SSE2)
|
||||
extern const fletcher_4_ops_t fletcher_4_sse2_ops;
|
||||
|
||||
Reference in New Issue
Block a user