Skip to content

Commit

Permalink
mm: compaction: push isolate search base of compact control one pfn a…
Browse files Browse the repository at this point in the history
…head

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Hillf Danton authored and Linus Torvalds committed Jan 11, 2012
1 parent e3a41a5 commit 31b8384
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 31b8384

Please sign in to comment.