Wu Fengguang wrote:
Hi Nick,
Hi Wu,
Then I disabled the shrinker by:
echo 0 > /proc/sys/vm/vfs_cache_pressure
That increased the number from
3393 28 45 0 0 0
to
6247 2672 45 0 0 0
And there is no sudden huge increases of free pages any more.
Yes, the inode shrinker can discard all pagecache from a file if
it is under a lot of pressure to free inodes. This is what you
are seeing I guess.
Maybe your patch is shrinking the slabs much more, though I cannot confirm this
from the source code. But one thing I'm sure is that there should be a lower
bound for the unused dentries, either absolutely or relatively, something like
this:
--- linux-2.6.15-rc1-mm2.orig/fs/dcache.c
+++ linux-2.6.15-rc1-mm2/fs/dcache.c
@@ -860,7 +860,7 @@ static int shrink_dcache_memory(int nr,
return -1;
prune_dcache(nr);
}
- return (dentry_stat.nr_unused / 100) * sysctl_vfs_cache_pressure;
+ return (dentry_stat.nr_unused / 1000) * 10 * sysctl_vfs_cache_pressure;
}
I don't think that kswapd-incmin puts much more pressure on the slab
(unless there is a bug), but I'll take a look. It could just be a
"weird" interaction in the reclaim code, or possibly a rounding issue.
Changing the pressure calculation here is probably not the right way
to do this, but rather in vmscan.c. I know Andrea has recently been
looking at a problem with slab shrinking too.
Thanks,
Nick
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]