]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: compaction: push isolate search base of compact control one pfn ahead
authorHillf Danton <dhillf@gmail.com>
Fri, 2 Dec 2011 03:12:06 +0000 (14:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Dec 2011 03:59:28 +0000 (14:59 +1100)
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 <dhillf@gmail.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c

index 899d95638586fcc65b44d631705845bef6245be3..8f8a5525dcde569fd2d4101fa9a0666328e58e4e 100644 (file)
@@ -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);