]> git.proxmox.com Git - mirror_zfs.git/commit
zcommon: Refactor FPU state handling in fletcher4
authorAttila Fülöp <attila@fueloep.org>
Tue, 14 Mar 2023 16:45:28 +0000 (17:45 +0100)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2023 16:45:28 +0000 (09:45 -0700)
commit78289b84589e632d87504df6a9c63b5ac694d2f9
tree92c27ba84107a5fc63c83be70dfe11e6ec4e278b
parentb15ab50c4d61729ae831ea76968b9fa4867d61cf
zcommon: Refactor FPU state handling in fletcher4

Currently calls to kfpu_begin() and kfpu_end() are split between
the init() and fini() functions of the particular SIMD
implementation. This was done in #14247 as an optimization measure
for the ABD adapter. Unfortunately the split complicates FPU
handling on platforms that use a local FPU state buffer, like
Windows and macOS.

To ease porting, we introduce a boolean struct member in
fletcher_4_ops_t, indicating use of the FPU, and move the FPU state
handling from the SIMD implementations to the call sites.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #14600
include/zfs_fletcher.h
lib/libzfs/libzfs.abi
module/zcommon/zfs_fletcher.c
module/zcommon/zfs_fletcher_aarch64_neon.c
module/zcommon/zfs_fletcher_avx512.c
module/zcommon/zfs_fletcher_intel.c
module/zcommon/zfs_fletcher_sse.c
module/zcommon/zfs_fletcher_superscalar.c
module/zcommon/zfs_fletcher_superscalar4.c