Re: [PATCH] mm: compaction: Check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 31 Jan 2012 16:35:28 +0000
Mel Gorman <mgorman@xxxxxxx> 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@xxxxxxxxxx>
> Signed-off-by: Mel Gorman <mgorman@xxxxxxx>
> Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx>

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

> Cc: stable@xxxxxxxxxx

So he (and others) will be confused.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  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@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]