Messages in this thread | | | Date | Wed, 8 Jul 1998 21:03:50 +0200 (CEST) | From | Rik van Riel <> | Subject | Re: cp file /dev/zero <-> cache [was Re: increasing page size] |
| |
On Wed, 8 Jul 1998, Stephen C. Tweedie wrote: > <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
It's been in the kernel since 2.1.90, or thereabouts... [vmscan.c:do_try_to_free_page()] Andrea has clearly pointed out that it doesn't work on small memory machines.
> 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.
It is self-balancing, just not enough so. Besides, my rule didn't place a limit on the cache size, it _only_ forces a cache reclamation when: - the cache is > xx% of memory AND - the inode in question takes > xx% of the cache
This means that the cache won't be trimmed when we need to cache some innocent small file.
Rik. +-------------------------------------------------------------------+ | Linux memory management tour guide. H.H.vanRiel@phys.uu.nl | | Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ | +-------------------------------------------------------------------+
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |