All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Mel Gorman <mgorman@suse.de>
Cc: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: compaction: Check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration
Date: Tue, 31 Jan 2012 12:40:26 -0800	[thread overview]
Message-ID: <20120131124026.15c0f495.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120131163528.GR4065@suse.de>

On Tue, 31 Jan 2012 16:35:28 +0000
Mel Gorman <mgorman@suse.de> wrote:

> When isolating for migration, migration starts at the start of a zone
> which is not necessarily pageblock aligned. Further, it stops isolating
> when COMPACT_CLUSTER_MAX pages are isolated so migrate_pfn is generally
> not aligned.
> 
> The problem is that pfn_valid is only called on the first PFN being
> checked. Lets say we have a case like this
> 
> H = MAX_ORDER_NR_PAGES boundary
> | = pageblock boundary
> m = cc->migrate_pfn
> f = cc->free_pfn
> o = memory hole
> 
> H------|------H------|----m-Hoooooo|ooooooH-f----|------H
> 
> The migrate_pfn is just below a memory hole and the free scanner is
> beyond the hole. When isolate_migratepages started, it scans from
> migrate_pfn to migrate_pfn+pageblock_nr_pages which is now in a memory
> hole. It checks pfn_valid() on the first PFN but then scans into the
> hole where there are not necessarily valid struct pages.
> 
> This patch ensures that isolate_migratepages calls pfn_valid when
> necessary.
> 
> Reported-and-tested-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
> Signed-off-by: Mel Gorman <mgorman@suse.de>
> Acked-by: Michal Nazarewicz <mina86@mina86.com>

The changelog forgot to describe the user-visible effects of the bug.

> Cc: stable@kernel.org

So he (and others) will be confused.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Mel Gorman <mgorman@suse.de>
Cc: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: compaction: Check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration
Date: Tue, 31 Jan 2012 12:40:26 -0800	[thread overview]
Message-ID: <20120131124026.15c0f495.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120131163528.GR4065@suse.de>

On Tue, 31 Jan 2012 16:35:28 +0000
Mel Gorman <mgorman@suse.de> wrote:

> When isolating for migration, migration starts at the start of a zone
> which is not necessarily pageblock aligned. Further, it stops isolating
> when COMPACT_CLUSTER_MAX pages are isolated so migrate_pfn is generally
> not aligned.
> 
> The problem is that pfn_valid is only called on the first PFN being
> checked. Lets say we have a case like this
> 
> H = MAX_ORDER_NR_PAGES boundary
> | = pageblock boundary
> m = cc->migrate_pfn
> f = cc->free_pfn
> o = memory hole
> 
> H------|------H------|----m-Hoooooo|ooooooH-f----|------H
> 
> The migrate_pfn is just below a memory hole and the free scanner is
> beyond the hole. When isolate_migratepages started, it scans from
> migrate_pfn to migrate_pfn+pageblock_nr_pages which is now in a memory
> hole. It checks pfn_valid() on the first PFN but then scans into the
> hole where there are not necessarily valid struct pages.
> 
> This patch ensures that isolate_migratepages calls pfn_valid when
> necessary.
> 
> Reported-and-tested-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
> Signed-off-by: Mel Gorman <mgorman@suse.de>
> Acked-by: Michal Nazarewicz <mina86@mina86.com>

The changelog forgot to describe the user-visible effects of the bug.

> Cc: stable@kernel.org

So he (and others) will be confused.

  reply	other threads:[~2012-01-31 20:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 16:35 [PATCH] mm: compaction: Check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration Mel Gorman
2012-01-31 16:35 ` Mel Gorman
2012-01-31 20:40 ` Andrew Morton [this message]
2012-01-31 20:40   ` Andrew Morton
2012-02-01 10:10   ` Mel Gorman
2012-02-01 10:10     ` Mel Gorman

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=20120131124026.15c0f495.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=herbert.van.den.bergh@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mina86@mina86.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 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.