linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, clameter@sgi.com,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: 2.6.22-rc4-mm1
Date: Thu, 7 Jun 2007 21:47:06 +0900	[thread overview]
Message-ID: <20070607214706.3efc5870.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20070606020737.4663d686.akpm@linux-foundation.org>

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 think that 'pte' passed to fixup_anon_page() by walk_page_range()
is not guaranteed to be 'Present'.

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.

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

-Kame


--
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 12:47 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 ` KAMEZAWA Hiroyuki [this message]
2007-06-07 15:34   ` 2.6.22-rc4-mm1 Andrew Morton
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=20070607214706.3efc5870.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --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