linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@in.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ken Chen <kenchen@google.com>, Hugh Dickins <hugh@veritas.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-mm@kvack.org
Subject: Re: [patch] not to disturb page LRU state when unmapping memory range
Date: Thu, 01 Feb 2007 00:45:03 +0530	[thread overview]
Message-ID: <45C0EAB7.5040903@in.ibm.com> (raw)
In-Reply-To: <1170246396.9516.39.camel@twins>

Peter Zijlstra wrote:
[snip]

> It preserves the information, but not more.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
> diff --git a/mm/memory.c b/mm/memory.c
> index ef09f0a..b1f9129 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -678,7 +678,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
>  				if (pte_dirty(ptent))
>  					set_page_dirty(page);
>  				if (pte_young(ptent))
> -					mark_page_accessed(page);
> +					SetPageReferenced(page);
>  				file_rss--;
>  			}
>  			page_remove_rmap(page, vma);

Does it make sense to do this only for shared mapped pages?

if (pte_young(ptent) && (page_mapcount(page) > 1))
	SetPageReferenced(page);


	Balbir Singh

--
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>

  reply	other threads:[~2007-02-01  7:17 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 [this message]
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
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=45C0EAB7.5040903@in.ibm.com \
    --to=balbir@in.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@osdl.org \
    --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