]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/vdev_raidz_math_ssse3.c
SIMD implementation of vdev_raidz generate and reconstruct routines
authorGvozden Neskovic <neskovic@gmail.com>
Mon, 25 Apr 2016 08:04:31 +0000 (10:04 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 21 Jun 2016 16:27:26 +0000 (09:27 -0700)
commitab9f4b0b824ab4cc64a4fa382c037f4154de12d6
treee38dea4c254c26e528aa0410bc39031f7901c520
parent09fb30e5e91d9f2ed622db6b616084ce1d073384
SIMD implementation of vdev_raidz generate and reconstruct routines

This is a new implementation of RAIDZ1/2/3 routines using x86_64
scalar, SSE, and AVX2 instruction sets. Included are 3 parity
generation routines (P, PQ, and PQR) and 7 reconstruction routines,
for all RAIDZ level. On module load, a quick benchmark of supported
routines will select the fastest for each operation and they will
be used at runtime. Original implementation is still present and
can be selected via module parameter.

Patch contains:
- specialized gen/rec routines for all RAIDZ levels,
- new scalar raidz implementation (unrolled),
- two x86_64 SIMD implementations (SSE and AVX2 instructions sets),
- fastest routines selected on module load (benchmark).
- cmd/raidz_test - verify and benchmark all implementations
- added raidz_test to the ZFS Test Suite

New zfs module parameters:
- zfs_vdev_raidz_impl (str): selects the implementation to use. On
  module load, the parameter will only accept first 3 options, and
  the other implementations can be set once module is finished
  loading. Possible values for this option are:
    "fastest" - use the fastest math available
    "original" - use the original raidz code
    "scalar" - new scalar impl
    "sse" - new SSE impl if available
    "avx2" - new AVX2 impl if available

See contents of `/sys/module/zfs/parameters/zfs_vdev_raidz_impl` to
get the list of supported values. If an implementation is not supported
on the system, it will not be shown. Currently selected option is
enclosed in `[]`.

Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4328
31 files changed:
cmd/Makefile.am
cmd/raidz_test/.gitignore [new file with mode: 0644]
cmd/raidz_test/Makefile.am [new file with mode: 0644]
cmd/raidz_test/raidz_bench.c [new file with mode: 0644]
cmd/raidz_test/raidz_test.c [new file with mode: 0644]
cmd/raidz_test/raidz_test.h [new file with mode: 0644]
configure.ac
include/sys/Makefile.am
include/sys/vdev_raidz.h [new file with mode: 0644]
include/sys/vdev_raidz_impl.h [new file with mode: 0644]
lib/libzpool/Makefile.am
man/man1/Makefile.am
man/man1/raidz_test.1 [new file with mode: 0644]
man/man5/zfs-module-parameters.5
module/zfs/Makefile.in
module/zfs/spa_misc.c
module/zfs/vdev_raidz.c
module/zfs/vdev_raidz_math.c [new file with mode: 0644]
module/zfs/vdev_raidz_math_avx2.c [new file with mode: 0644]
module/zfs/vdev_raidz_math_impl.h [new file with mode: 0644]
module/zfs/vdev_raidz_math_scalar.c [new file with mode: 0644]
module/zfs/vdev_raidz_math_sse.c [new file with mode: 0644]
tests/runfiles/linux.run
tests/zfs-tests/include/default.cfg.in
tests/zfs-tests/tests/functional/Makefile.am
tests/zfs-tests/tests/functional/raidz/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/raidz/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/raidz/raidz_001_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/raidz/raidz_002_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/raidz/setup.ksh [new file with mode: 0755]
zfs-script-config.sh.in