Re: negative dentries wasting ram

Andrea Arcangeli (andrea@suse.de)
Sat, 25 May 2002 00:31:11 +0200


On Fri, May 24, 2002 at 06:14:47PM -0400, Jan Harkes wrote:
> Most interesting is the following message with a patch from you, because
> the dcache and icache were pruned 'too agressively' when the new VM was
> on the verge of being introduced in 2.4.10 :) Considering that what you
> are proposing now is even more agressive than that, it is almost amusing.
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=100076684905307&w=2

that was really too much aggressive, it was getting shrunk even with
plenty of cache available. at that time we were missing the
refill_inactive list logic. if you read the patch in such email
carefully, you'll see the that the shrink_dcache_memory(priority,
gfp_mask), shrink_icache_memory(priority, gfp_mask) were executed
_before_ finishing probing the pagecache levels.

before that patch it was so aggressive that the dcache/icache could be
shrunk before finishing probing the pagecache, so it would be fine for
the inactive-dentries actually :), but only for them! :)

In short what we do is:

probe and shrink pagecache

if we probe some remote shortage of pagecache we do the next step:

shrink dcache icache and start some pagetable walking to decrease the mapping pressure

So if the system swaps like crazy the inode cache must definitely be
shrunk very hard, if it doesn't it's a vm bug.

There is no inchoerency with what I said and the previous email, it's
just that at that time it was way too aggressive, it was shrinking the
icache/dcache way before finishing probing the pagecache-active list too
for excessive amounts of clean cache.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/