Well I thought we were shooting down inodes a bit aggressively.  With 30,000
inodes total and 1000 unused, the 1000 are getting reclaimed instantly.

shrink_icache_memory() needs to return the number of reclaimable inodes to
page reclaim, not the total number.



 fs/inode.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff -puN fs/inode.c~inode-pruning-fix fs/inode.c
--- 25/fs/inode.c~inode-pruning-fix	2003-03-03 15:32:16.000000000 -0800
+++ 25-akpm/fs/inode.c	2003-03-03 15:34:31.000000000 -0800
@@ -453,8 +453,13 @@ static void prune_icache(int nr_to_scan)
 }
 
 /*
- * This is called from kswapd when we think we need some
- * more memory. 
+ * shrink_icache_memory() will attempt to reclaim some unused inodes.  Here,
+ * "unused" means that no dentries are referring to the inodes: the files are
+ * not open and the dcache references to those inodes have already been
+ * reclaimed.
+ *
+ * This function is passed the number of inodes to scan, and it returns the
+ * total number of remaining possibly-reclaimable inodes.
  */
 static int shrink_icache_memory(int nr, unsigned int gfp_mask)
 {
@@ -467,7 +472,7 @@ static int shrink_icache_memory(int nr, 
 		if (gfp_mask & __GFP_FS)
 			prune_icache(nr);
 	}
-	return inodes_stat.nr_inodes;
+	return inodes_stat.nr_unused;
 }
 
 /*

_