HomeFreeBSD

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

Description

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

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.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Closes: #4726

Details

Provenance
Tim Chase <tim@chase2k.com>Authored on Jun 16 2016, 3:19 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jun 17 2016, 8:33 PM
Parents
rG46ab35954c7a: Remove libzfs_graph.c
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG09fb30e5e91d: Linux 4.6 compat: Fall back to d_prune_aliases() if necessary (authored by Tim Chase <tim@chase2k.com>).Jun 17 2016, 8:33 PM