-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add rwsem_tryupgrade for 4.9.20-rt16 kernel #7589
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
Conversation
|
Awesome! Thanks for working on this. I will build it on one of my machines next week. |
|
@behlendorf I checked your patch on one of my machines, but it didn't work for me. Maybe I didn't do the right things, but I'll try to explain as best as I can. Sorry if I did something stupid, this is my first time fiddling around with these things. This is on Arch Linux. Here ZFS is a user-maintained package that is actually divided into 4 packages Building the package works, and building the dkms-modules for the vanilla-, lts- and zen-kernel works, but not for the rt-kernel.
I can make further tests, just tell me. |
|
@steven-omaha thanks for testing. When I get a chance, I'll give this a test run with the Arch Linux RT kernel which looks like a convenient way to test this. |
|
@steven-omaha I've updated this PR and addressed the issue you likely encountered. Without this change I was able to reproduce the reported build issue when using the Debian |
The RT rwsem implementation was changed to allow multiple readers as of the 4.9.20-rt16 patch set. This results in a build failure because the existing implementation was forced to directly access the rwsem structure which has changed. While this could be accommodated by adding additional compatibility code. This patch resolves the build issue by simply assuming the rwsem can never be upgraded. This functionality is a performance optimization and all callers must already handle this case. Converting the last remaining use of __SPIN_LOCK_UNLOCKED to spin_lock_init() was additionally required to get a clean build. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
@behlendorf Thanks for working on this. I tried to build it, but to no avail. I think the error is on my side. I'm not really familiar with building projects as complex as zfs / spl. I'm using the same building steps again (see above), but I'm now patching the source using your commit a38d724. It doesn't matter if I try this from the last tagged version, or the recent master. I always get failed patching. EDIT: If you could help me out with this issue, I'm more than willing to test this on my machine. |
|
@steven-omaha try this. Instead of wrangling the patch and manually applying it you can download the pre-patched source as a tarball from github like this. |
Codecov Report
@@ Coverage Diff @@
## master #7589 +/- ##
==========================================
- Coverage 78.25% 78.16% -0.09%
==========================================
Files 368 368
Lines 111981 111981
==========================================
- Hits 87628 87529 -99
- Misses 24353 24452 +99
Continue to review full report at Codecov.
|
|
@behlendorf I checked this on Arch using |
Description
The RT rwsem implementation was changed to allow multiple readers
as of the 4.9.20-rt16 patch set. This results in a build failure
because the existing implementation was forced to directly access
the rwsem strucgture which has changed.
While this could be accommodated by adding additional compatibility
code. This patch resolves the build issue by simply assuming the
rwsem can never be upgraded. This functionality is a performance
optimization and all callers must already handle this case.
Motivation and Context
openzfs/spl#611
How Has This Been Tested?
Locally built, which isn't saying much. But it should work @clefru, @kernelOfTruth, or @steven-omaha would you be able to test that this resolves the build issue.
Types of changes
Checklist:
Signed-off-by.