Re: missing madvise functionality

Andrew Morton
2007-04-03T21:16:56Z

On Tue, 03 Apr 2007 17:00:09 -0400
Rik van Riel <riel@redhat.com> wrote:

> Andrew Morton wrote:
>
> > Oh. I was assuming that we'd want to unmap these pages from pagetables and
> > mark then super-easily-reclaimable. So a later touch would incur a minor
> > fault.
> >
> > But you think that we should leave them mapped into pagetables so no such
> > fault occurs.
>
> > Leaving the pages mapped into pagetables means that they are considerably
> > less likely to be reclaimed.
>
> If we move the pages to a place where they are very likely to be
> reclaimed quickly (end of the inactive list, or a separate
> reclaim list) and clear the dirty and referenced lists, we can
> both reclaim the page easily *and* avoid the page fault penalty.
>

ah, yes, you're right. That part should work nicely.