zfs/config
Attila Fülöp 76354f945e ICP: Improve AES-GCM performance
Currently SIMD accelerated AES-GCM performance is limited by two
factors:

a. The need to disable preemption and interrupts and save the FPU
state before using it and to do the reverse when done. Due to the
way the code is organized (see (b) below) we have to pay this price
twice for each 16 byte GCM block processed.

b. Most processing is done in C, operating on single GCM blocks.
The use of SIMD instructions is limited to the AES encryption of the
counter block (AES-NI) and the Galois multiplication (PCLMULQDQ).
This leads to the FPU not being fully utilized for crypto
operations.

To solve (a) we do crypto processing in larger chunks while owning
the FPU. An `icp_gcm_avx_chunk_size` module parameter was introduced
to make this chunk size tweakable. It defaults to 32 KiB. This step
alone roughly doubles performance. (b) is tackled by porting and
using the highly optimized openssl AES-GCM assembler routines, which
do all the processing (CTR, AES, GMULT) in a single routine. Both
steps together result in up to 32x reduction of the time spend in
the en/decryption routines, leading up to approximately 12x
throughput increase for large (128 KiB) blocks.

Lastly, this commit changes the default encryption algorithm from
AES-CCM to AES-GCM when setting the `encryption=on` property.

Reviewed-By: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-By: Jason King <jason.king@joyent.com>
Reviewed-By: Tom Caputi <tcaputi@datto.com>
Reviewed-By: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #9749
2020-05-12 10:53:32 -07:00
..
.gitignore Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
Rules.am compile with -fno-omit-frame-pointer 2019-04-14 11:04:54 -07:00
always-arch.m4 Illumos Crypto Port module added to enable native encryption in zfs 2016-07-20 10:43:30 -07:00
always-compiler-options.m4 compile with -fno-omit-frame-pointer 2019-04-14 11:04:54 -07:00
always-python.m4 Python config cleanup 2019-09-25 11:27:47 -07:00
always-pyzfs.m4 Python config cleanup 2019-09-25 11:27:47 -07:00
ax_code_coverage.m4 Fix typos in config/ 2020-01-22 13:48:58 -08:00
ax_python_devel.m4 Adopt pyzfs from ClusterHQ 2018-05-01 10:33:35 -07:00
ax_restore_flags.m4 config: better libtirpc detection 2019-03-02 16:19:05 -08:00
ax_save_flags.m4 config: better libtirpc detection 2019-03-02 16:19:05 -08:00
config.awk Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
config.rpath Prevent `make distclean` removing config/config.rpath 2019-04-26 11:22:14 -07:00
deb.am Fix dracut Debian/Ubuntu packaging 2019-09-25 11:27:49 -07:00
find_system_library.m4 config: better libtirpc detection 2019-03-02 16:19:05 -08:00
gettext.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
host-cpu-c-abi.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
iconv.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
intlmacosx.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
kernel-access-ok-type.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-acl-refcount.m4 Linux 4.16 compat: use correct *_dec_and_test() 2018-02-22 09:02:06 -08:00
kernel-acl.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-aio-fsync.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-automount.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bdev-logical-size.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bdev-physical-size.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bdi.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bio-bvec-iter.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bio-end-io-t-args.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bio-failfast.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bio-op.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bio-rw-barrier.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bio-rw-discard.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-bio-tryget.m4 Linux 5.5 compat: blkg_tryget() 2020-05-12 10:53:32 -07:00
kernel-bio_set_dev.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blk-queue-bdi.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blk-queue-discard.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blk-queue-flags.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blk-queue-flush.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blk-queue-max-hw-sectors.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blk-queue-max-segments.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blk-queue-unplug.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blkdev-get-by-path.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-blkdev-reread-part.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-block-device-operations.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-clear-inode.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-commit-metadata.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-config-defined.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-create-nameidata.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-ctl-table-name.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-current-time.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-current_bio_tail.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-declare-event-class.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-dentry-operations.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-dirty-inode.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-discard-granularity.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-encode-fh-inode.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-evict-inode.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-fallocate.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-file-dentry.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-file-inode.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-fmode-t.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-follow-down-one.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-fpu.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-fst-mount.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-fsync.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-generic_io_acct.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-generic_readlink.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-get-disk-and-module.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-get-disk-ro.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-get-link.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-global_page_state.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-group-info.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-in-compat-syscall.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-inode-getattr.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-inode-lock.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-inode-set-flags.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-inode-set-iversion.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-inode-times.m4 Linux 5.6 compat: timestamp_truncate() 2020-05-12 10:53:32 -07:00
kernel-insert-inode-locked.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-invalidate-bdev-args.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-is_owner_or_cap.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-kmap-atomic-args.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-kmem-cache.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-kmem.m4 Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
kernel-kstrtoul.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-ktime.m4 Linux 5.6 compat: ktime_get_raw_ts64() 2020-05-12 10:53:32 -07:00
kernel-kuid-helpers.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-kuidgid.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-lookup-bdev.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-lookup-nameidata.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-lseek-execute.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-make-request-fn.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-misc-minor.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-mkdir-umode-t.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-mod-param.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-objtool.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-open-bdev-exclusive.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-pde-data.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-proc-operations.m4 Linux 5.6 compat: struct proc_ops 2020-05-12 10:53:32 -07:00
kernel-put-link.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-rename.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-rw.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-rwsem.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-sched.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-security-inode-init.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-set-nlink.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-setattr-prepare.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-sget-args.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-show-options.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-shrink.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-submit_bio.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-super-userns.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-timer.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-tmpfile.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-totalhigh_pages.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-totalram-pages-func.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-truncate-range.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-truncate-setsize.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-userns-capabilities.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-usleep_range.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-vfs-direct_IO.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-vfs-fsync.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-vfs-getattr.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-vfs-iterate.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-vfs-rw-iterate.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-wait.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-xattr-handler.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel-zlib.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
kernel.m4 Linux 5.6 compat: struct proc_ops 2020-05-12 10:53:32 -07:00
lib-ld.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
lib-link.m4 Fix typos in config/ 2020-01-22 13:48:58 -08:00
lib-prefix.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
mount-helper.m4 The mount helper mount.zfs MUST be in /sbin (not '$sbindir'). 2015-05-18 16:54:36 -07:00
nls.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
pkg.m4 Fix typos in config/ 2020-01-22 13:48:58 -08:00
po.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
progtest.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
rpm.am Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
suppressed-warnings.txt Suppress packaging warning 2011-11-08 11:32:04 -08:00
tgz.am Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
toolchain-simd.m4 ICP: Improve AES-GCM performance 2020-05-12 10:53:32 -07:00
user-dracut.m4 Accept udev and dracut paths specified by ./configure 2014-06-11 16:32:57 -07:00
user-gettext.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
user-libaio.m4 Fix mmap / libaio deadlock 2018-03-28 10:19:22 -07:00
user-libblkid.m4 Fix config issues: frame size and headers 2018-02-15 12:58:23 -08:00
user-libexec.m4 Tunable directory for zfs runtime scripts 2018-06-07 09:59:59 -07:00
user-libssl.m4 Fix config issues: frame size and headers 2018-02-15 12:58:23 -08:00
user-libtirpc.m4 config: better libtirpc detection 2019-03-02 16:19:05 -08:00
user-libudev.m4 Fix WANT_DEVNAME2DEVID configure error 2016-04-01 09:06:54 -07:00
user-libuuid.m4 Cleanup linking 2016-03-18 13:31:11 -07:00
user-makedev.m4 glibc 2.5 compat: use correct header for makedev() et al. 2017-03-31 09:32:00 -07:00
user-runstatedir.m4 Add defs for makefile installation dir vars 2014-03-31 16:11:13 -07:00
user-systemd.m4 Fix systemd spec file macros 2018-11-11 18:06:36 -08:00
user-sysvinit.m4 Add systemd unit files for ZFS startup 2014-02-05 12:25:30 -08:00
user-udev.m4 Accept udev and dracut paths specified by ./configure 2014-06-11 16:32:57 -07:00
user-zlib.m4 Cleanup linking 2016-03-18 13:31:11 -07:00
user.m4 Fix typos in config/ 2020-01-22 13:48:58 -08:00
zfs-build.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00
zfs-meta.m4 Perform KABI checks in parallel 2020-01-22 13:49:01 -08:00