-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Linux SPL: tidying #18117
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 SPL: tidying #18117
Conversation
Long ago, SPL atomics were implemented as a global spinlock over conventional operations. In 5e9b5d8 (2009-10) they was converted to proper atomics, with the spinlock retained as a fallback. The switch to compile with the fallback was later removed in a912589 (2018-05), but the code it enabled wasn't. So lets do that. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
It's a lot of rarely-compiled code, so move it to the side to make other code easier to read. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
These are used to implement the kstat and procfs_list interfaces, and aren't used from outside. There's no need to export them. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
This code is only compiled for the Linux kernel module, so that define is always set. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
amotin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am surprised that kernel does not provide 64bit math...
behlendorf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well these days the kernel does provide 64-bit division on 32-bit architectures as long as you use the various helper function do_div, div64_u64, div64_s64. This was originally needed way back in 2010. These days we could likely just provide the __udivdi3, __divdi3, symbols as wrappers around those helpers. But that would be for another PR, the cleanup itself looks good!
It's a lot of rarely-compiled code, so move it to the side to make other code easier to read. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #18117
These are used to implement the kstat and procfs_list interfaces, and aren't used from outside. There's no need to export them. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #18117
This code is only compiled for the Linux kernel module, so that define is always set. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #18117
Motivation and Context
Just a few small cleanup targets of opportunity while studying symbol exports.
Description
See commit messages. Summary:
kstat_proc_entry_*APIs_KERNELcheckHow Has This Been Tested?
ZTS run completed.
Types of changes
Checklist:
Signed-off-by.