Inodes on inode_unused are fairly useless: their dentries have been reclaimed and they are unlikely to be used inthe near future, and we probably need to perform seeks to reestablish them anyway. So increase the shrinkage rate of unused inodes by a lot. --- fs/inode.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) diff -puN fs/inode.c~shrink-inode-cache-harder fs/inode.c --- 25/fs/inode.c~shrink-inode-cache-harder 2004-03-02 03:06:09.000000000 -0800 +++ 25-akpm/fs/inode.c 2004-03-02 03:07:25.000000000 -0800 @@ -465,6 +465,10 @@ static void prune_icache(int nr_to_scan) * * This function is passed the number of inodes to scan, and it returns the * total number of remaining possibly-reclaimable inodes. + * + * Because the inode_unused inodes are pretty useless, and inodes are large, + * we tell lies to the VM about the number of unused inodes so inode_unused + * will be shrunk harder. */ static int shrink_icache_memory(int nr, unsigned int gfp_mask) { @@ -477,7 +481,7 @@ static int shrink_icache_memory(int nr, if (gfp_mask & __GFP_FS) prune_icache(nr); } - return inodes_stat.nr_unused; + return inodes_stat.nr_unused * 8; } static void __wait_on_freeing_inode(struct inode *inode); _