From 877fb780de7096851cdeb1f052e7a13c8c56bd4c Mon Sep 17 00:00:00 2001 From: Hillf Danton Date: Fri, 2 Dec 2011 14:12:06 +1100 Subject: [PATCH] mm: compaction: push isolate search base of compact control one pfn ahead After isolated the current pfn will no longer be scanned and isolated if the next round is necessary, so push the isolate_migratepages search base of the given compact_control one step ahead. Signed-off-by: Hillf Danton Reviewed-by: Andrea Arcangeli Cc: Mel Gorman Signed-off-by: Andrew Morton --- mm/compaction.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index 899d95638586..8f8a5525dcde 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -365,8 +365,10 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, nr_isolated++; /* Avoid isolating too much */ - if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) + if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) { + ++low_pfn; break; + } } acct_isolated(zone, cc); -- 2.39.5