On Fri, Feb 3, 2012 at 8:18 PM, Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx> wrote:
From: Michal Nazarewicz <mina86@xxxxxxxxxx>
diff --git a/mm/compaction.c b/mm/compaction.c
index d5174c4..a6e7c64 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -45,6 +45,11 @@ static void map_pages(struct list_head *list)
}
}
+static inline bool migrate_async_suitable(int migratetype)
Just nitpick, since the helper is not directly related to what async means,
how about migrate_suitable(int migrate_type) ?
+{
+ return is_migrate_cma(migratetype) || migratetype == MIGRATE_MOVABLE;
+}
+
/*
* Isolate free pages onto a private freelist. Caller must hold zone->lock.
* If @strict is true, will abort returning 0 on any invalid PFNs or non-free
@@ -277,7 +282,7 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
*/
pageblock_nr = low_pfn >> pageblock_order;
if (!cc->sync && last_pageblock_nr != pageblock_nr &&
- get_pageblock_migratetype(page) != MIGRATE_MOVABLE) {
+ migrate_async_suitable(get_pageblock_migratetype(page))) {
Here compaction looks corrupted if CMA not enabled, Mel?