Skip to content
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: remove code gated behind kernel version checks #16545

Closed
wants to merge 2 commits into from

Conversation

robn
Copy link
Member

@robn robn commented Sep 19, 2024

Motivation and Context

A bit more support for older kernels that we'll never use. Should have been in #16479, just an oversight that it wasn't.

Description

There's a few places where we tested LINUX_VERSION_CODE for versions in the past. Remove those, and the support code for the "older" kernels versions that we'll never see again.

Didn't remove the compound page code for the moment, just the version check, for reasons described within.

How Has This Been Tested?

Compile checked against 6.1.x only.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Following 2b06976 (openzfs#16479), anything gated on a kernel version before
4.18 can be always included/excluded.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <[email protected]>
All kernels we support have compound pages that work the way we would
like. However, this code is new and this knowledge was hard won, so I'd
like to leave the description and option there for a little while, even
if it can only be disabled with a recompile.

Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/
@robn
Copy link
Member Author

robn commented Sep 19, 2024

@mcmilk would appreciate your expert eye on simd_aarch64.h and simd_powerpc.h, as I have no way to test them. Outside of a dumb mechanical error I can't see how they'd be wrong, but I know different archs often have different & unobvious subtleties. Cheers!

@Harry-Chen
Copy link
Contributor

Harry-Chen commented Sep 19, 2024

On aarch64 kernel_neon_{begin,end} is gated behind EXPORT_SYMBOL_GPL since 6.2 (see #15711, and torvalds/linux@aaeca98). So ksimd is not actually usable for a while.

@mcmilk
Copy link
Contributor

mcmilk commented Sep 19, 2024

@Harry-Chen - I remember, I wanted to create a workaround via spl for this. It's on my TODO list again.

@rincebrain
Copy link
Contributor

I would suggest implementing our own, rather than wrapping the GPL-only functions, since historical precedent shows they'll just stop exposing the symbols if we do that.

@mcmilk
Copy link
Contributor

mcmilk commented Sep 19, 2024

I will try to implement this 👌

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Sep 19, 2024
behlendorf pushed a commit that referenced this pull request Sep 19, 2024
All kernels we support have compound pages that work the way we would
like. However, this code is new and this knowledge was hard won, so I'd
like to leave the description and option there for a little while, even
if it can only be disabled with a recompile.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Tino Reichardt <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16545
mcmilk pushed a commit to mcmilk/zfs that referenced this pull request Sep 20, 2024
Following 2b06976 (openzfs#16479), anything gated on a kernel version before
4.18 can be always included/excluded.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Tino Reichardt <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16545
mcmilk pushed a commit to mcmilk/zfs that referenced this pull request Sep 20, 2024
All kernels we support have compound pages that work the way we would
like. However, this code is new and this knowledge was hard won, so I'd
like to leave the description and option there for a little while, even
if it can only be disabled with a recompile.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Tino Reichardt <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants