Re: [PATCH -mm] vmscan: protect a fraction of file backed mapped pages from reclaim

Rik van Riel
2009-05-12T17:08:40Z

Christoph Lameter wrote:
> All these expiration modifications do not take into account that a desktop
> may sit idle for hours while some other things run in the background (like
> backups at night or updatedb and other maintenance things). This still
> means that the desktop will be usuable in the morning.

New file pages start on the inactive list and will get reclaimed
after one access. Only file pages that get accessed multiple times
get promoted to the active file LRU.

The patch that only allows active file pages to be deactivated
if the active file LRU is larger than the inactive file LRU should
protect the working set from being evicted due to streaming IO.

Even if the working set is currently idle.

> I have had some success with a patch that protects a pages in the file
> cache from being unmapped if the mapped pages are below a certain
> percentage of the file cache. Its another VM knob to define the percentage
> though.

That is another way of protecting mapped file pages, but it does
not have the side effect of protecting the page cache working set
on eg. file servers or mysql or postgresql installs with default
tunables (which rely heavily on the page cache to cache the right
things).

--
All rights reversed.