linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, clameter@sgi.com,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Matt Mackall <mpm@selenic.com>,
	David Rientjes <rientjes@google.com>
Subject: Re: 2.6.22-rc4-mm1
Date: Thu, 7 Jun 2007 08:34:58 -0700	[thread overview]
Message-ID: <20070607083458.a3fc7737.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070607214706.3efc5870.kamezawa.hiroyu@jp.fujitsu.com>

On Thu, 7 Jun 2007 21:47:06 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

> Question.
> 
> While writing memory unplug, I noticed this code.
> ==
> static int
> fixup_anon_page(pte_t *pte, unsigned long start, unsigned long end, void *priv)
> {
>         struct vm_area_struct *vma = priv;
>         struct page *page = vm_normal_page(vma, start, *pte);
> 
>         if (page && PageAnon(page))
>                 page->index = linear_page_index(vma, start);
> 
>         return 0;
> }
> 
> static int fixup_anon_pages(struct vm_area_struct *vma)
> {
>         struct mm_walk walk = {
>                 .pte_entry = fixup_anon_page,
>         };
> 
>         return walk_page_range(vma->vm_mm,
>                         vma->vm_start, vma->vm_end, &walk, vma);
> }

I assume the above is your code - it's not in the tree?

> 
> I think that 'pte' passed to fixup_anon_page() by walk_page_range()
> is not guaranteed to be 'Present'.

yup - the pagewalker only checks for !pte_none().

> Then, vm_normal_page() will show print_bad_pte().

> If this never occur now, I'll add my own check code for memory migration by kernel here.

Yes, you'll need to perform additional filtering where appropriate.

> (Sorry, I can't find who should be CCed.)

Matt and David did most of the work here.

--
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-06-07 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070606020737.4663d686.akpm@linux-foundation.org>
2007-06-07 12:47 ` 2.6.22-rc4-mm1 KAMEZAWA Hiroyuki
2007-06-07 15:34   ` Andrew Morton [this message]
2007-06-08  0:31     ` 2.6.22-rc4-mm1 KAMEZAWA Hiroyuki

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=20070607083458.a3fc7737.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=rientjes@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