Re: cp file /dev/zero <-> cache [was Re: increasing page size]

Stephen C. Tweedie (sct@redhat.com)
Wed, 8 Jul 1998 14:50:59 +0100


Hi,

On Tue, 7 Jul 1998 18:00:29 +0200 (CEST), Rik van Riel
<H.H.vanRiel@phys.uu.nl> said:

> When a file consumes more than a certain percentage
> of the page cache and the page cache is larger than
> a certain percentage of memory, we must grab a page
> from the page cache instead of getting a new page...

There's a better way (I've already got this on the way for 2.1, and will
be experimenting with the performance to see whether it has unexpected
nasty side-effects): don't _force_ a cache reclaim, but simply set the
cache as the preferential source in try_to_free_page(). It's the most
powerful yet simple way of forcing the cache to be pruned more
aggressively the more data is flooding through it, yet still allowing
the cache to grow if we can't find useful free space.

There are potential problems with this behaviour, but it "feels" right:
it is inherently self-balancing and has no arbitrary rules to govern the
cache size at any moment in time.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu