]> granicus.if.org Git - zfs/commit
Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 24 Oct 2019 17:17:33 +0000 (10:17 -0700)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2019 17:17:33 +0000 (10:17 -0700)
commit10fa254539ec41c6b043785d4e7ab34bce383b9f
treec26798d9a42546096cb5bf2b0afeb4ef5257d48e
parentb834b58ae61063f526ce82df348440e31c58c232
Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore

Contrary to initial testing we cannot rely on these kernels to
invalidate the per-cpu FPU state and restore the FPU registers.
Nor can we guarantee that the kernel won't modify the FPU state
which we saved in the task struck.

Therefore, the kfpu_begin() and kfpu_end() functions have been
updated to save and restore the FPU state using our own dedicated
per-cpu FPU state variables.

This has the additional advantage of allowing us to use the FPU
again in user threads.  So we remove the code which was added to
use task queues to ensure some functions ran in kernel threads.

Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #9346
Closes #9403
19 files changed:
config/kernel-fpu.m4
include/os/linux/kernel/linux/simd.h
include/os/linux/kernel/linux/simd_aarch64.h
include/os/linux/kernel/linux/simd_x86.h
include/sys/zio_crypt.h
lib/libspl/include/sys/simd.h
module/icp/algs/aes/aes_impl.c
module/icp/algs/modes/gcm.c
module/icp/include/aes/aes_impl.h
module/icp/include/modes/gcm_impl.h
module/icp/io/aes.c
module/os/linux/spl/spl-taskq.c
module/os/linux/spl/spl-thread.c
module/os/linux/zfs/zio_crypt.c
module/zcommon/zfs_fletcher.c
module/zcommon/zfs_prop.c
module/zfs/arc.c
module/zfs/dsl_crypt.c
module/zfs/vdev_raidz_math.c