Re: Eek: dcache is being toasted completely upon low mem

Andrea Arcangeli (andrea@e-mind.com)
Thu, 11 Feb 1999 19:00:55 +0100 (CET)


On Thu, 11 Feb 1999, Simon Kirby wrote:

>Why? prune_dcache() is being called with count=0, and this causes count
>to wrap in the if condition:
>
> if (!--count)
> break;

I think because you want to do a pass on the whole list or over ~0UL
dcache entries.

>prune_dcache(0) is called from shrink_dcache_memory() which appears
>(according to the comment) to originally support some form of shrinking
>priority, but was changed to just prune_dcache(0) (which is now toasting
>everything). shrink_dcache_memory() is called from

The comment is obsolete I think.

>do_try_to_free_pages(), meaning that we're toasting the dcache each and
>every time nr_free_pages falls too low.

Not every time nr_free_pages is too low but every time your machine can't
swapout and can't shrink the cache at priority = 6. With my latest VM code
it's really unlikely to happens if you really don't need to shrink the
dcache and inodes.

Could you try:

ftp://e-mind.com/pub/linux/arca-tree/2.2.2-pre2_arca-4.gz

It's against 2.2.2-pre2 (the pre2 patch can be found in the testing
directory of a kernel mirror).

Andrea Arcangeli

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