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

4.6 Compat: Fall back to d_prune_aliases() if necessary #4769

Closed
wants to merge 1 commit into from

Conversation

dweeezil
Copy link
Contributor

As of 4.6, the icache and dcache LRUs are memcg aware insofar as the
kernel's per-superblock shrinker is concerned. The effect is that dcache
or icache entries added by a task in a non-root memcg won't be scanned
by the shrinker in the context of the root (or NULL) memcg. This defeats
the attempts by zfs_sb_prune() to unpin buffers and can allow metadata to
grow uncontrollably. This patch reverts to the d_prune_aliaes() method
in case the kernel's per-superblock shrinker is not able to free anything.

Fixes: #4726

As of 4.6, the icache and dcache LRUs are memcg aware insofar as the
kernel's per-superblock shrinker is concerned.  The effect is that dcache
or icache entries added by a task in a non-root memcg won't be scanned
by the shrinker in the context of the root (or NULL) memcg.  This defeats
the attempts by zfs_sb_prune() to unpin buffers and can allow metadata to
grow uncontrollably.  This patch reverts to the d_prune_aliaes() method
in case the kernel's per-superblock shrinker is not able to free anything.

Fixes: openzfs#4726
@dweeezil
Copy link
Contributor Author

Time to see whether this works for all of the various kernels.

@behlendorf
Copy link
Contributor

Thanks for tacking this, the patch LGTM. I've re-submitted the two failed testers since both failures looked unrelated.

@tuxoko
Copy link
Contributor

tuxoko commented Jun 17, 2016

Nice. LGTM.

@behlendorf
Copy link
Contributor

@dweeezil let me know if your happy with this as the final patch and I'll merge it.

@dweeezil
Copy link
Contributor Author

@behlendorf Go for it.

@behlendorf
Copy link
Contributor

Merged as:

09fb30e Linux 4.6 compat: Fall back to d_prune_aliases() if necessary

@behlendorf behlendorf closed this Jun 17, 2016
@behlendorf behlendorf added this to the 0.6.5.8 milestone Jun 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants