aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-05-08 03:23:49 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:14:58 -0400
commit24c32d733dd44dbc5b9dcd0b8de58e16fdbeac76 (patch)
treeecec100dc2c779d09669d08681339ded6bf5409a /fs/dcache.c
parentd52b908646b88cb1952ab8c9b2d4423908a23f11 (diff)
mm: shrink parent dentries when shrinking slab
Teach the dentry slab shrinker to aggressively shrink parent dentries when shrinking the dentry cache. This is done to attempt to improve the situation where the dentry slab cache gets a lot of internal fragmentation due to pages containing directory dentries. It is expected that this change will cause some of those dentries to be reaped earlier, and with less scanning. Needs careful testing. Cc: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 681cab81b454..268da2e2bc09 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -879,7 +879,7 @@ static int shrink_dcache_memory(int nr, gfp_t gfp_mask)
879 if (nr) { 879 if (nr) {
880 if (!(gfp_mask & __GFP_FS)) 880 if (!(gfp_mask & __GFP_FS))
881 return -1; 881 return -1;
882 prune_dcache(nr, NULL, 0); 882 prune_dcache(nr, NULL, 1);
883 } 883 }
884 return (dentry_stat.nr_unused / 100) * sysctl_vfs_cache_pressure; 884 return (dentry_stat.nr_unused / 100) * sysctl_vfs_cache_pressure;
885} 885}