On Fri, Nov 18, 2011 at 05:43:10PM +0100, Marek Szyprowski wrote:From: Michal Nazarewicz <mina86@xxxxxxxxxx>
diff --git a/mm/compaction.c b/mm/compaction.c
index 6afae0e..09c9702 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -111,7 +111,10 @@ skip:
next:
pfn += isolated;
- page += isolated;
+ if (zone_pfn_same_memmap(pfn - isolated, pfn))
+ page += isolated;
+ else
+ page = pfn_to_page(pfn);
}
Is this necessary?
We are isolating pages, the largest of which is a MAX_ORDER_NR_PAGES
page. [...]
That said, everywhere else managed to avoid checks like this by always
scanning in units of pageblocks. Maybe this should be structured
the same way to guarantee pfn_valid is called at least per pageblock
(even though only once per MAX_ORDER_NR_PAGES is necessary).