From: Nick Piggin <npiggin@suse.de>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: Nick Piggin <npiggin@suse.de>, Andi Kleen <ak@suse.de>,
Hugh Dickins <hugh@veritas.com>, Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: Race in new page migration code?
Date: Tue, 17 Jan 2006 12:16:10 +0100 [thread overview]
Message-ID: <20060117111609.GA24083@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.62.0601162104550.21654@schroedinger.engr.sgi.com>
On Mon, Jan 16, 2006 at 09:06:29PM -0800, Christoph Lameter wrote:
> On Mon, 16 Jan 2006, Nick Piggin wrote:
>
> > On Mon, Jan 16, 2006 at 05:51:26PM +0100, Andi Kleen wrote:
> > >
> > > I agree with Christoph that the zero page should be ignored - old behaviour
> > > was really a bug.
> > >
> >
> > Fair enough. It would be nice to have a comment there has Hugh said;
> > it is not always clear what PageReserved is intended to test for.
>
> Something like this? Are there still other uses of PageReserved than the
> zero page?
>
Yes something like that would be good.
There are other users of PageReserved, drivers, memory holes,
kernel text, bootmem allocated memory (I think), ZERO_PAGE.
>
> Explain the use of PageReserved in check_pte_range.
>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
>
> Index: linux-2.6.15/mm/mempolicy.c
> ===================================================================
> --- linux-2.6.15.orig/mm/mempolicy.c 2006-01-14 10:56:31.000000000 -0800
> +++ linux-2.6.15/mm/mempolicy.c 2006-01-16 21:03:03.000000000 -0800
> @@ -211,6 +211,17 @@ static int check_pte_range(struct vm_are
> page = vm_normal_page(vma, addr, *pte);
> if (!page)
> continue;
> + /*
> + * The check for PageReserved here is important to avoid
> + * handling zero pages and other pages that may have been
> + * marked special by the system.
> + *
> + * If the PageReserved would not be checked here then f.e.
> + * the location of the zero page could have an influence
> + * on MPOL_MF_STRICT, zero pages would be counted for
> + * the per node stats, and there would be useless attempts
> + * to put zero pages on the migration list.
> + */
> if (PageReserved(page))
> continue;
> nid = page_to_nid(page);
WARNING: multiple messages have this Message-ID (diff)
From: Nick Piggin <npiggin@suse.de>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: Nick Piggin <npiggin@suse.de>, Andi Kleen <ak@suse.de>,
Hugh Dickins <hugh@veritas.com>, Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: Race in new page migration code?
Date: Tue, 17 Jan 2006 12:16:10 +0100 [thread overview]
Message-ID: <20060117111609.GA24083@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.62.0601162104550.21654@schroedinger.engr.sgi.com>
On Mon, Jan 16, 2006 at 09:06:29PM -0800, Christoph Lameter wrote:
> On Mon, 16 Jan 2006, Nick Piggin wrote:
>
> > On Mon, Jan 16, 2006 at 05:51:26PM +0100, Andi Kleen wrote:
> > >
> > > I agree with Christoph that the zero page should be ignored - old behaviour
> > > was really a bug.
> > >
> >
> > Fair enough. It would be nice to have a comment there has Hugh said;
> > it is not always clear what PageReserved is intended to test for.
>
> Something like this? Are there still other uses of PageReserved than the
> zero page?
>
Yes something like that would be good.
There are other users of PageReserved, drivers, memory holes,
kernel text, bootmem allocated memory (I think), ZERO_PAGE.
>
> Explain the use of PageReserved in check_pte_range.
>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
>
> Index: linux-2.6.15/mm/mempolicy.c
> ===================================================================
> --- linux-2.6.15.orig/mm/mempolicy.c 2006-01-14 10:56:31.000000000 -0800
> +++ linux-2.6.15/mm/mempolicy.c 2006-01-16 21:03:03.000000000 -0800
> @@ -211,6 +211,17 @@ static int check_pte_range(struct vm_are
> page = vm_normal_page(vma, addr, *pte);
> if (!page)
> continue;
> + /*
> + * The check for PageReserved here is important to avoid
> + * handling zero pages and other pages that may have been
> + * marked special by the system.
> + *
> + * If the PageReserved would not be checked here then f.e.
> + * the location of the zero page could have an influence
> + * on MPOL_MF_STRICT, zero pages would be counted for
> + * the per node stats, and there would be useless attempts
> + * to put zero pages on the migration list.
> + */
> if (PageReserved(page))
> continue;
> nid = page_to_nid(page);
--
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>
next prev parent reply other threads:[~2006-01-17 11:16 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-14 15:55 Race in new page migration code? Nick Piggin
2006-01-14 15:55 ` Nick Piggin
2006-01-14 18:01 ` Christoph Lameter
2006-01-14 18:01 ` Christoph Lameter
2006-01-14 18:19 ` Nick Piggin
2006-01-14 18:19 ` Nick Piggin
2006-01-14 18:58 ` Christoph Lameter
2006-01-14 18:58 ` Christoph Lameter
2006-01-15 5:28 ` Nick Piggin
2006-01-15 5:28 ` Nick Piggin
2006-01-16 6:54 ` Christoph Lameter
2006-01-16 6:54 ` Christoph Lameter
2006-01-16 7:44 ` Nick Piggin
2006-01-16 7:44 ` Nick Piggin
2006-01-17 8:29 ` Magnus Damm
2006-01-17 8:29 ` Magnus Damm
2006-01-17 9:01 ` Nick Piggin
2006-01-17 9:01 ` Nick Piggin
2006-01-17 9:22 ` Magnus Damm
2006-01-17 9:22 ` Magnus Damm
2006-01-15 6:58 ` Nick Piggin
2006-01-15 6:58 ` Nick Piggin
2006-01-15 10:58 ` Hugh Dickins
2006-01-15 10:58 ` Hugh Dickins
2006-01-16 6:51 ` Christoph Lameter
2006-01-16 6:51 ` Christoph Lameter
2006-01-16 12:32 ` Hugh Dickins
2006-01-16 12:32 ` Hugh Dickins
2006-01-16 15:47 ` Christoph Lameter
2006-01-16 15:47 ` Christoph Lameter
2006-01-16 16:06 ` Hugh Dickins
2006-01-16 16:06 ` Hugh Dickins
2006-01-16 16:10 ` Christoph Lameter
2006-01-16 16:10 ` Christoph Lameter
2006-01-16 16:28 ` Hugh Dickins
2006-01-16 16:28 ` Hugh Dickins
2006-01-16 16:51 ` Andi Kleen
2006-01-16 16:51 ` Andi Kleen
2006-01-16 16:56 ` Nick Piggin
2006-01-16 16:56 ` Nick Piggin
2006-01-17 5:06 ` Christoph Lameter
2006-01-17 5:06 ` Christoph Lameter
2006-01-17 11:16 ` Nick Piggin [this message]
2006-01-17 11:16 ` Nick Piggin
2006-01-17 17:29 ` Christoph Lameter
2006-01-17 17:29 ` Christoph Lameter
2006-01-17 18:46 ` Lee Schermerhorn
2006-01-17 18:46 ` Lee Schermerhorn
2006-01-17 18:48 ` Christoph Lameter
2006-01-17 18:48 ` Christoph Lameter
2006-01-17 19:01 ` Hugh Dickins
2006-01-17 19:01 ` Hugh Dickins
2006-01-17 20:15 ` Christoph Lameter
2006-01-17 20:15 ` Christoph Lameter
2006-01-17 20:49 ` Hugh Dickins
2006-01-17 20:49 ` Hugh Dickins
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=20060117111609.GA24083@wotan.suse.de \
--to=npiggin@suse.de \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=clameter@engr.sgi.com \
--cc=hugh@veritas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.