-
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
3.12 compat, 4.0 compat for super_operations shrinker callbacks #3308
3.12 compat, 4.0 compat for super_operations shrinker callbacks #3308
Conversation
fe3de22
to
445ba57
Compare
I'm going to leave this as-is until it gets through the buildbots. Although it does "fix" an error, it may actually make matters worse because the value returned by the Unless we can do something useful in the |
Following on to @chrisrd's comment regarding my note above, #3350, which is running a kernel on which the autoconf test will actually work, provides a bit more evidence we should either get rid of the callback or simply have it return zero for the time being. I'd suggest having it return zero to leave the callbacks in place mainly for documentation. In fact, I'll update the pull request accordingly. |
@dweeezil I agree. We should update these callbacks so that they simply return zero but leave them in place. I strongly suspect we're going to have a use for them once the ARC is integrated with the page cache. At that point we should be able to abandon out existing overly broad shrinker hook in favor of something per-filesystem like this. |
445ba57
to
90463f4
Compare
Updated pull request with commentary as to potential future use. |
@dweeezil it looks like this is going to need a second look to resolve the build failures. |
I'll look into the failures. I clearly need to try it with a handful of intermediate kernels. |
3.12 API change - A node ID argument was added to the nr_cached_objects and free_cached_objects callbacks in struct super_operations. 4.0 API change - The node ID and nr_to_scan arguments to the nr_cached_objects and free_cached_objects callbacks in struct super_operations were replaced with a single struct shrink_control argument. Also, the return value from each callback should be long. Since this will effectively enable the callbacks on post-3.12 kernels and there is currently no free_cached_objects callback, the nr_cached_objects has been disabled until additional page cache integration is done at which time it's likely to be necessary to have a proper implementation of both callbacks.
90463f4
to
03126cb
Compare
Closing as stale. #3495 addressed the Linux 3.12 compatibility issue and we can open a new pull request for the remaining less critical 4.0 issue. |
3.12 API change - A node ID argument was added to the nr_cached_objects
and free_cached_objects callbacks in struct super_operations.
4.0 API change - The node ID and nr_to_scan arguments to the
nr_cached_objects and free_cached_objects callbacks in struct
super_operations were replaced with a single struct shrink_control
argument.
Also, the return value from each callback should be long.
I've not tested this yet, however, it means we've not had the
nr_cached_objects
callback enabled for quite some time, if ever. I found this while looking into #3303.