mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amerigo Wang <xiyou.wangcong@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: Moussa Ba <moussa.a.ba@gmail.com>,
	linux-kernel@vger.kernel.org, xiyou.wangcong@gmail.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Matt Mackall <mpm@selenic.com>, Mel Gorman <mel@csn.ul.ie>,
	Ying Han <yinghan@google.com>, Nick Piggin <npiggin@suse.de>,
	jaredeh@gmail.com
Subject: Re: [PATCH 1/1] pagemap clear_refs: modify to specify anon or mapped vma clearing
Date: Tue, 28 Jul 2009 11:24:58 +0800	[thread overview]
Message-ID: <20090728032254.GA5889@cr0.nay.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0907271657160.27881@chino.kir.corp.google.com>

On Mon, Jul 27, 2009 at 04:58:20PM -0700, David Rientjes wrote:
>On Mon, 27 Jul 2009, Moussa Ba wrote:
>
>> The other alternative would be to just forgo the additional function
>> clear_refs_walk_vma and rewrite the for loop as:
>> 
>>         for (vma = mm->mmap; vma; vma = vma->vm_next) {
>> 			clear_refs_walk.private = vma;
>> 			if (type < CLEAR_REFS_ALL || type > CLEAR_REFS_MAPPED)
>> 				continue;
>> 			if (is_vm_hugetlb_page(vma))
>> 				continue;
>> 			if (type == CLEAR_REFS_ANON && vma->vm_file)
>> 				continue;
>> 			if (type == CLEAR_REFS_MAPPED && !vma->vm_file)
>> 				continue;
>> 			walk_page_range(vma->vm_start, vma->vm_end, this_walk);
>>         }
>> 
>
>That looks good, with the exception of the check for
>type < CLEAR_REFS_ALL || type > CLEAR_REFS_MAPPED being in the loop.

And also that it looks like is_vm_hugetlb_page() is already checked
outside, no need to check it again. :-)

Thanks.

  reply	other threads:[~2009-07-28  3:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24  3:57 Moussa A. Ba
2009-07-24  8:39 ` Amerigo Wang
2009-07-24 18:00   ` Moussa Ba
2009-07-27 20:19   ` Moussa A. Ba
2009-07-27 20:30     ` Matt Mackall
2009-07-27 20:57     ` David Rientjes
2009-07-27 22:14       ` Moussa Ba
2009-07-27 22:20         ` Matt Mackall
2009-07-27 22:49         ` David Rientjes
2009-07-27 23:38           ` Moussa Ba
2009-07-27 23:42             ` Moussa Ba
2009-07-27 23:58             ` David Rientjes
2009-07-28  3:24               ` Amerigo Wang [this message]
2009-07-28 16:44               ` Moussa A. Ba
2009-07-28 21:01                 ` David Rientjes
2009-07-28 22:52                   ` Moussa A. Ba
2009-07-28 23:52                     ` Andrew Morton
2009-07-29  0:00                       ` Moussa Ba
2009-07-29 14:58                         ` Mel Gorman
2009-07-29 16:41                           ` Matt Mackall
2009-07-30 19:21                           ` Moussa Ba

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=20090728032254.GA5889@cr0.nay.redhat.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jaredeh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=moussa.a.ba@gmail.com \
    --cc=mpm@selenic.com \
    --cc=npiggin@suse.de \
    --cc=rientjes@google.com \
    --cc=yinghan@google.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

Powered by JetHome