diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/compaction.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index cf7086c6dc07..9b94eaf537e4 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -144,9 +144,20 @@ static void isolate_freepages(struct zone *zone, | |||
144 | int nr_freepages = cc->nr_freepages; | 144 | int nr_freepages = cc->nr_freepages; |
145 | struct list_head *freelist = &cc->freepages; | 145 | struct list_head *freelist = &cc->freepages; |
146 | 146 | ||
147 | /* | ||
148 | * Initialise the free scanner. The starting point is where we last | ||
149 | * scanned from (or the end of the zone if starting). The low point | ||
150 | * is the end of the pageblock the migration scanner is using. | ||
151 | */ | ||
147 | pfn = cc->free_pfn; | 152 | pfn = cc->free_pfn; |
148 | low_pfn = cc->migrate_pfn + pageblock_nr_pages; | 153 | low_pfn = cc->migrate_pfn + pageblock_nr_pages; |
149 | high_pfn = low_pfn; | 154 | |
155 | /* | ||
156 | * Take care that if the migration scanner is at the end of the zone | ||
157 | * that the free scanner does not accidentally move to the next zone | ||
158 | * in the next isolation cycle. | ||
159 | */ | ||
160 | high_pfn = min(low_pfn, pfn); | ||
150 | 161 | ||
151 | /* | 162 | /* |
152 | * Isolate free pages until enough are available to migrate the | 163 | * Isolate free pages until enough are available to migrate the |