Skip to content

Commit

Permalink
Revert "Implementation of SSE optimized Fletcher-4"
Browse files Browse the repository at this point in the history
This reverts commit 35a76a0 to
resolve the following panic which was introduced.

RIP  [<ffffffffa0241d11>] fletcher_4_sse2_fini+0x11/0xb0 [zcommon]
Pid: 813, comm: modprobe Tainted: P      D    -- ------------
2.6.32-642.3.1.el6.x86_64 #1
Call Trace:
 [<ffffffff81546c21>] ? panic+0xa7/0x179
 [<ffffffff8154baa4>] ? oops_end+0xe4/0x100
 [<ffffffff8101102b>] ? die+0x5b/0x90
 [<ffffffff8154b572>] ? do_general_protection+0x152/0x160
 [<ffffffff8100c4ae>] ? xen_hvm_callback_vector+0xe/0x20
 [<ffffffff8154ace5>] ? general_protection+0x25/0x30
 [<ffffffffa0241d00>] ? fletcher_4_sse2_fini+0x0/0xb0 [zcommon]
 [<ffffffffa0241d11>] ? fletcher_4_sse2_fini+0x11/0xb0 [zcommon]
 [<ffffffff81007bc1>] ? xen_clocksource_read+0x21/0x30
 [<ffffffff81007ca9>] ? xen_clocksource_get_cycles+0x9/0x10
 [<ffffffff810b1b65>] ? getrawmonotonic+0x35/0xc0
 [<ffffffffa0241077>] ? fletcher_4_init+0x227/0x260 [zcommon]
 [<ffffffff812a8490>] ? kvasprintf+0x70/0x90
 [<ffffffffa024d000>] ? zcommon_init+0x0/0xd [zcommon]
 [<ffffffffa024d009>] ? zcommon_init+0x9/0xd [zcommon]
 [<ffffffff810020d0>] ? do_one_initcall+0xc0/0x280
 [<ffffffff810c8371>] ? sys_init_module+0xe1/0x250
 [<ffffffff8100b0d2>] ? system_call_fastpath+0x16/0x1b

Disable zimport testing against master where this flaw exists:

TEST_ZIMPORT_VERSIONS="installed"

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
behlendorf committed Jul 18, 2016
1 parent 1b87e0f commit 7b94a8d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 243 deletions.
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.

0 comments on commit 7b94a8d

Please sign in to comment.