[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100223143259.GB29762@cmpxchg.org>
Date: Tue, 23 Feb 2010 15:32:59 +0100
From: Johannes Weiner <hannes@...xchg.org>
To: Minchan Kim <minchan.kim@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Rik van Riel <riel@...hat.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch 2/3] vmscan: drop page_mapping_inuse()
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists