linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 2/3] vmscan: drop page_mapping_inuse()
Date: Tue, 23 Feb 2010 15:32:59 +0100	[thread overview]
Message-ID: <20100223143259.GB29762@cmpxchg.org> (raw)
In-Reply-To: <1266933800.2723.24.camel@barrios-desktop>

Hello Minchan,

On Tue, Feb 23, 2010 at 11:03:20PM +0900, Minchan Kim wrote:
> On Mon, 2010-02-22 at 20:49 +0100, Johannes Weiner wrote:
> > Protecting file pages that are not by themselves mapped but are part
> > of a mapped file is also a historic leftover for short-lived things
> 
> I have been a question in the part.
> You seem to solve my long question. :)
> But I want to make sure it by any log.
> Could you tell me where I find the discussion mail thread or git log at
> that time?

I dug up this change in history.git, but unfortunately it was merged
undocumented in a large changeset.  So there does not seem to be any
written reason for why this was merged initially.    What I wrote is
based on what Rik told me on IRC.

> >  	/* Reclaim if clean, defer dirty pages to writeback */
> > @@ -1378,7 +1357,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
> >  		}
> >  
> >  		/* page_referenced clears PageReferenced */
> > -		if (page_mapping_inuse(page) &&
> > +		if (page_mapped(page) &&
> >  		    page_referenced(page, 0, sc->mem_cgroup, &vm_flags)) {
> >  			nr_rotated++;
> >  			/*
> 
> It's good to me.
> But page_referenced already have been checked page_mapped. 
> How about folding alone page_mapped check into page_referenced's inner?

The next patch essentially does that.  page_referenced() will no longer
clear PG_referenced on the page and if page_referenced() is true, it
means that young ptes were found and the page must thus be mapped.

So #3 removes the page_mapped() from this conditional.

	Hannes

--
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:[~2010-02-23 14:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 19:49 mm: used-once mapped file page detection Johannes Weiner
2010-02-22 19:49 ` [patch 1/3] vmscan: factor out page reference checks Johannes Weiner
2010-02-22 20:27   ` Rik van Riel
2010-02-23 13:38   ` Minchan Kim
2010-02-23 14:21     ` Johannes Weiner
2010-02-23 14:31       ` Rik van Riel
2010-02-23 14:44       ` Minchan Kim
2010-02-23 15:40         ` Johannes Weiner
2010-02-23 16:04           ` Minchan Kim
2010-02-22 19:49 ` [patch 2/3] vmscan: drop page_mapping_inuse() Johannes Weiner
2010-02-22 20:28   ` Rik van Riel
2010-02-23 14:03   ` Minchan Kim
2010-02-23 14:32     ` Johannes Weiner [this message]
2010-02-23 14:48       ` Minchan Kim
2010-02-22 19:49 ` [patch 3/3] vmscan: detect mapped file pages used only once Johannes Weiner
2010-02-22 20:34   ` Rik van Riel
2010-02-23 15:03   ` Minchan Kim
2010-02-23 15:45     ` Johannes Weiner
2010-02-24 21:39 ` mm: used-once mapped file page detection Andrew Morton
2010-02-26 14:32   ` Johannes Weiner
2010-02-28 17:49     ` Rik van Riel
2010-02-28 20:36       ` Johannes Weiner

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=20100223143259.GB29762@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --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