From: Peter Zijlstra <peterz@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, mbligh@mbligh.org, riel@redhat.com
Subject: Re: [patch 1/1] vmscan: give referenced, active and unmapped pages a second trip around the LRU
Date: Fri, 25 May 2007 09:23:30 +0200 [thread overview]
Message-ID: <1180077810.7348.20.camel@twins> (raw)
In-Reply-To: <20070525001812.9dfc972e.akpm@linux-foundation.org>
On Fri, 2007-05-25 at 00:18 -0700, Andrew Morton wrote:
> On Fri, 25 May 2007 09:02:45 +0200 Peter Zijlstra <peterz@infradead.org> wrote:
>
> > > + } else if (TestClearPageReferenced(page)) {
> > > + list_add(&page->lru, &l_active);
> > > + continue;
> > > }
> > > list_add(&page->lru, &l_inactive);
> > > }
> >
> > I myself prefer a patch like this:
> >
> > ---
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index 53ad8ee..5addda9 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -957,16 +957,17 @@ force_reclaim_mapped:
> > spin_unlock_irq(&zone->lru_lock);
> >
> > while (!list_empty(&l_hold)) {
> > + int referenced;
> > +
> > cond_resched();
> > page = lru_to_page(&l_hold);
> > list_del(&page->lru);
> > - if (page_mapped(page)) {
> > - if (!reclaim_mapped ||
> > - (total_swap_pages == 0 && PageAnon(page)) ||
> > - page_referenced(page, 0)) {
> > - list_add(&page->lru, &l_active);
> > - continue;
> > - }
> > +
> > + referenced = page_referenced(page, 0);
> > + if (referenced || (page_mapped(page) && !reclaim_mapped) ||
> > + (total_swap_pages == 0 && PageAnon(page))) {
> > + list_add(&page->lru, &l_active);
> > + continue;
> > }
> > list_add(&page->lru, &l_inactive);
> > }
>
> That does a bit of extra work in the !PageReferenced && !page_mapped case,
> but whatever.
>
> The question is: what effect does the change have on page reclaim
> effectiveness? And how much more swappy does it become? And
> how much more oom-killery?
All very good questions, of which I'd like to know the answers too :-(
I'm sitting on a huge pile of reclaim code, and have no real way of
answering these questions; I did start writing some synthetic benchmark
suite, but never really finished it - perhaps I ought to dive into that
again after OLS.
The trouble I had with the previous patch is that it somehow looks to
PG_referenced but not the PTE state, that seems wrong to me.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-05-25 7:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-24 23:57 akpm, Andrew Morton
2007-05-25 7:02 ` Peter Zijlstra
2007-05-25 7:18 ` Andrew Morton
2007-05-25 7:23 ` Peter Zijlstra [this message]
2007-05-25 7:28 ` Andrew Morton
2007-05-25 7:36 ` Peter Zijlstra
2007-05-25 7:48 ` Andrew Morton
2007-05-25 7:51 ` Peter Zijlstra
2007-05-25 8:01 ` Andrew Morton
2007-05-25 8:35 ` Peter Zijlstra
2007-05-25 8:43 ` Andrew Morton
2007-05-25 10:13 ` Peter Zijlstra
2007-05-25 14:50 ` Rik van Riel
2007-05-25 14:43 ` Rik van Riel
2007-05-25 17:20 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1180077810.7348.20.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mbligh@mbligh.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox