Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Implementation of SSE optimized Fletcher-4" #4861

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions include/zfs_fletcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ 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
Expand Down
1 change: 0 additions & 1 deletion lib/libzpool/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ KERNEL_C = \
zfs_deleg.c \
zfs_fletcher.c \
zfs_fletcher_intel.c \
zfs_fletcher_sse.c \
zfs_namecheck.c \
zfs_prop.c \
zfs_uio.c \
Expand Down
14 changes: 5 additions & 9 deletions man/man5/zfs-module-parameters.5
Original file line number Diff line number Diff line change
Expand Up @@ -838,15 +838,11 @@ Default value: \fB67,108,864\fR.
.RS 12n
Select a fletcher 4 implementation.
.sp
Supported selectors are: \fBfastest\fR, \fBscalar\fR, \fBsse2\fR, \fBssse3\fR,
and \fBavx2\fR. All of the selectors except \fBfastest\fR and \fBscalar\fR
require instruction set extensions to be available and will only appear if ZFS
detects that they are present at runtime. If multiple implementations of
fletcher 4 are available, the \fBfastest\fR will be chosen using a micro
benchmark. Selecting \fBscalar\fR results in the original CPU based calculation
being used. Selecting any option other than \fBfastest\fR and \fBscalar\fR
results in vector instructions from the respective CPU instruction set being
used.
Supported selectors are: \fBfastest\fR, \fBscalar\fR, and \fBavx2\fR when
AVX2 is supported by the processor. If multiple implementations of fletcher 4
are available the \fBfastest\fR will be chosen using a micro benchmark.
Selecting \fBscalar\fR results in the original CPU based calculation being
used, \fBavx2\fR uses the AVX2 vector instructions to compute a fletcher 4.
.sp
Default value: \fBfastest\fR.
.RE
Expand Down
1 change: 0 additions & 1 deletion module/zcommon/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ $(MODULE)-objs += zfs_uio.o
$(MODULE)-objs += zpool_prop.o

$(MODULE)-$(CONFIG_X86) += zfs_fletcher_intel.o
$(MODULE)-$(CONFIG_X86) += zfs_fletcher_sse.o
19 changes: 0 additions & 19 deletions module/zcommon/zfs_fletcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,6 @@ static const fletcher_4_ops_t fletcher_4_scalar_ops = {

static const fletcher_4_ops_t *fletcher_4_algos[] = {
&fletcher_4_scalar_ops,
#if defined(HAVE_SSE2)
&fletcher_4_sse2_ops,
#endif
#if defined(HAVE_SSE2) && defined(HAVE_SSSE3)
&fletcher_4_ssse3_ops,
#endif
#if defined(HAVE_AVX) && defined(HAVE_AVX2)
&fletcher_4_avx2_ops,
#endif
Expand All @@ -163,12 +157,6 @@ static const fletcher_4_ops_t *fletcher_4_algos[] = {
static enum fletcher_selector {
FLETCHER_FASTEST = 0,
FLETCHER_SCALAR,
#if defined(HAVE_SSE2)
FLETCHER_SSE2,
#endif
#if defined(HAVE_SSE2) && defined(HAVE_SSSE3)
FLETCHER_SSSE3,
#endif
#if defined(HAVE_AVX) && defined(HAVE_AVX2)
FLETCHER_AVX2,
#endif
Expand All @@ -181,12 +169,6 @@ static struct fletcher_4_impl_selector {
} fletcher_4_impl_selectors[] = {
[ FLETCHER_FASTEST ] = { "fastest", NULL },
[ FLETCHER_SCALAR ] = { "scalar", &fletcher_4_scalar_ops },
#if defined(HAVE_SSE2)
[ FLETCHER_SSE2 ] = { "sse2", &fletcher_4_sse2_ops },
#endif
#if defined(HAVE_SSE2) && defined(HAVE_SSSE3)
[ FLETCHER_SSSE3 ] = { "ssse3", &fletcher_4_ssse3_ops },
#endif
#if defined(HAVE_AVX) && defined(HAVE_AVX2)
[ FLETCHER_AVX2 ] = { "avx2", &fletcher_4_avx2_ops },
#endif
Expand Down Expand Up @@ -425,7 +407,6 @@ fletcher_4_init(void)
ops->init(&zc);
do {
ops->compute(databuf, data_size, &zc);
ops->compute_byteswap(databuf, data_size, &zc);
run_count++;
} while (gethrtime() < start + bench_ns);
if (ops->fini != NULL)
Expand Down
205 changes: 0 additions & 205 deletions module/zcommon/zfs_fletcher_sse.c

This file was deleted.