-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux 5.0 compat: SIMD compatibility (zfs-0.8-release) #9515
Linux 5.0 compat: SIMD compatibility (zfs-0.8-release) #9515
Conversation
Does this still permit people who have re-exported the relevant kernel symbol to use that codepath? IIRC, grsec re-exports the originally un-exported symbol, and so do all of our branches. |
@sempervictus yes it does. If the kernel exports the needed symbols they will be used. You can verify this in the configure output: Using provided kernel symbols (one of these):
Using internal ZFS implementation:
Optimizations are disabled:
|
Restore the SIMD optimization for 4.19.38 LTS, 4.14.120 LTS, and 5.0 and newer kernels. This commit squashes the following commits from master in to a single commit which can be applied to 0.8.2. 10fa254 - Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore b88ca2a - Enable SIMD for encryption 095b541 - Fix CONFIG_X86_DEBUG_FPU build failure e5db313 - Linux 5.0 compat: SIMD compatibility Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> TEST_ZIMPORT_SKIP="yes"
3dc9472
to
4f9e825
Compare
What's the state of this? I see very high |
fxsave and xsave require the target address to be 16-/64-byte aligned. kmalloc(_node) does not (yet) offer such fine-grained control over alignment[0,1], even though it does "the right thing" most of the time for power-of-2 sizes. unfortunately, alignment is completely off when using certain debugging or hardening features/configs, such as KASAN, slub_debug=Z or the not-yet-upstream SLAB_CANARY. Use alloc_pages_node() instead which allows us to allocate page-aligned memory. Since fpregs_state is padded to a full page anyway, and this code is only relevant for x86 which has 4k pages, this approach should not allocate any unnecessary memory but still guarantee the needed alignment. 0: https://lwn.net/Articles/787740/ 1: https://lore.kernel.org/linux-block/20190826111627.7505-1-vbabka@suse.cz/ Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#9608 Closes openzfs#9674
@nh2 this is now ready for inclusion in 0.8.3. One additional commit has been added to resolve an issue which only manifests itself with some Linux kernel debug options. |
Closing. These changes have been included in #9776. |
Motivation and Context
Backport of the SIMD patches merged to master for inclusion in
the 0.8.x series. Opened for a full CI run.
Description
Restore the SIMD optimization for 4.19.38 LTS, 4.14.120 LTS,
and 5.0 and newer kernels.
This commit squashes the following commits from master in to
a single commit which can be applied to 0.8.2.
10fa254 - Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore
b88ca2a - Enable SIMD for encryption
095b541 - Fix CONFIG_X86_DEBUG_FPU build failure
e5db313 - Linux 5.0 compat: SIMD compatibility
How Has This Been Tested?
Locally tested using the
mprime -t
torture tests while concurrentlywriting to and scrubbing an encrypted raidz2 pool. This exercises
the vector implementation for fletcher4, aes, and raidz parity calculations.
No failures were reported by
mprime -t
after several hours of run time.Types of changes
Checklist:
Signed-off-by
.