From: Andrew Morton <akpm@osdl.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hugh Dickins <hugh@veritas.com>, Ken Chen <kenchen@google.com>,
linux-mm@kvack.org
Subject: Re: [patch] not to disturb page LRU state when unmapping memory range
Date: Wed, 31 Jan 2007 16:33:33 -0800 [thread overview]
Message-ID: <20070131163333.4a803e5b.akpm@osdl.org> (raw)
In-Reply-To: <1170287534.10924.103.camel@lappy>
On Thu, 01 Feb 2007 00:52:14 +0100
Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > In the above (simple, common) scenario the proposed
> > s/mark_page_accessed/SetPageReferenced/ change will cause the page to end
> > up PageReferenced+!PageActive.
>
> How so, it will not demote the page to inactive.
>
> Now unmap could promote to active, with the change not so. Neither will
> ever demote, only page reclaim will do that.
>
> currently with mark_page_accessed:
>
> referenced := (pte young || PageReferenced)
>
> 1 active pte
>
> referenced (pte, !PG_referenced), inactive -> referenced, inactive
> referenced (pte ,PG_referenced), inactive -> unreferenced, active
> *, active -> referenced, active
>
> 2 active ptes
>
> referenced (pte, !PG_referenced), inactive -> unreferenced, active
> referenced (pte, PG_referenced), inactive -> referenced, active
> *, active -> referenced, active
>
> 3+ active ptes
>
> *, * -> referenced, active
>
> which I find quite horrid for unmap...
>
> Or, with the proposed SetPageReferenced:
>
> 1+ active pte(s)
> referenced (pte,!PG_referenced), * -> referenced (PG_referenced), *
> referenced (pte, PG_referenced), * -> referenced (PG_referenced), *
>
> Its actually an identity map, it just moves pte young bits into the
> referenced bit, which is all the same to page_referenced().
<head spins>
Test it. On the major fault the pages start out on the inactive list. On
the munmap they goe onto the active list. Taking the mark_page_accessed()
out of munmap() causes them to remain on the inactive list.
> > ie: it ends up on the inactive list and not
> > the active list. <tests it, confirms>.
>
> it will stay on whatever list it was.
Namely the inactive list. Unlike 2.6.20-rc7. That's a big change.
--
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-02-01 0:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 4:41 Ken Chen
2007-01-31 12:26 ` Peter Zijlstra
2007-01-31 19:15 ` Balbir Singh
2007-01-31 19:30 ` Christoph Lameter
2007-01-31 18:02 ` Hugh Dickins
2007-01-31 21:43 ` Peter Zijlstra
2007-01-31 21:51 ` Ken Chen
2007-01-31 22:04 ` Andrew Morton
2007-01-31 22:25 ` Peter Zijlstra
2007-01-31 22:48 ` Andrew Morton
2007-01-31 23:52 ` Peter Zijlstra
2007-02-01 0:33 ` Andrew Morton [this message]
2007-02-01 3:21 ` Rik van Riel
2007-02-01 3:13 ` Rik van Riel
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=20070131163333.4a803e5b.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hugh@veritas.com \
--cc=kenchen@google.com \
--cc=linux-mm@kvack.org \
/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