[lkml]   [2001]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] prune_icache() fix
	Look and enjoy. If prune_icache() doesn't shoot its goal, it
tries to sync some dirty inodes and look for freeable ones one more
time. The sad thing being, counter is not reset on the second pass.
I.e. you end up with nr_unused decremented by 2 * freed_at_the_first_pass +
Result: underestimated nr_unused. Since that's what we use for
determining the pressure on icache...

Seeing negative number in /proc/sys/fs/inode-nr is... well, an
interesting experience.

Please, apply the patch below.
PS: _Ouch_. 6 hours of hunting for this one.

diff -urN S4/fs/inode.c S4-prune_icache/fs/inode.c
--- S4/fs/inode.c Sat Apr 28 02:12:56 2001
+++ S4-prune_icache/fs/inode.c Sat Apr 28 21:37:25 2001
@@ -612,12 +612,13 @@
struct list_head *entry, *freeable = &list;
- int count = 0, synced = 0;
+ int count, synced = 0;
struct inode * inode;


+ count = 0;
entry = inode_unused.prev;
while (entry != &inode_unused)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.043 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site