diff options
author | Brian Behlendorf <[email protected]> | 2014-10-03 13:00:53 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-10-17 14:58:50 -0700 |
commit | 050d22b06834876c3b0554647108f06a05b3ba96 (patch) | |
tree | b4fdb72326ddf3891143d8e73aff4ec35c708349 /module/zfs/zpl_super.c | |
parent | 60bba628149439c4d36c6d75f726f0e3fabdbb4f (diff) |
Remove shrink_dcache_memory() and shrink_icache_memory()
This functionality is optional and until Linux 3.0, which
provided per-filesystem shinkers, they was never a reasonable
interface. Therefore, this functionality is being dropped
for earlier kernels.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #2757
Diffstat (limited to 'module/zfs/zpl_super.c')
-rw-r--r-- | module/zfs/zpl_super.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c index 45639a6dd..410030461 100644 --- a/module/zfs/zpl_super.c +++ b/module/zfs/zpl_super.c @@ -288,34 +288,18 @@ zpl_prune_sb(struct super_block *sb, void *arg) error = -zfs_sb_prune(sb, *(unsigned long *)arg, &objects); ASSERT3S(error, <=, 0); } +#endif /* HAVE_SHRINK */ void zpl_prune_sbs(int64_t bytes_to_scan, void *private) { +#ifdef HAVE_SHRINK unsigned long nr_to_scan = (bytes_to_scan / sizeof (znode_t)); iterate_supers_type(&zpl_fs_type, zpl_prune_sb, &nr_to_scan); kmem_reap(); -} -#else -/* - * Linux 2.6.x - 3.0 API - * - * These are best effort interfaces are provided by the SPL to induce - * the Linux VM subsystem to reclaim a fraction of the both dnode and - * inode caches. Ideally, we want to just target the zfs file systems - * however our only option is to reclaim from them all. - */ -void -zpl_prune_sbs(int64_t bytes_to_scan, void *private) -{ - unsigned long nr_to_scan = (bytes_to_scan / sizeof (znode_t)); - - shrink_dcache_memory(nr_to_scan, GFP_KERNEL); - shrink_icache_memory(nr_to_scan, GFP_KERNEL); - kmem_reap(); -} #endif /* HAVE_SHRINK */ +} #ifdef HAVE_NR_CACHED_OBJECTS static int |