On 07/08/2014 07:09 PM, Ben Hutchings wrote:
On Mon, 2014-06-09 at 11:39 +0200, Vlastimil Babka wrote:
commit 7ed695e069c3cbea5e1fd08f84a04536da91f584 upstream.
Compaction of a zone is finished when the migrate scanner (which begins
at the zone's lowest pfn) meets the free page scanner (which begins at
the zone's highest pfn). This is detected in compact_zone() and in the
case of direct compaction, the compact_blockskip_flush flag is set so
that kswapd later resets the cached scanner pfn's, and a new compaction
may again start at the zone's borders.
[...]
This can be applied to 3.2 (with some fuzz), but is it a worthwile fix
there?
Hi, I think 3.2 is fine. While free scanner might miss the scanners
meeting, there's this code in isolate_migratepages() that ensures the
scanners cross:
/* Do not scan outside zone boundaries */
low_pfn = max(cc->migrate_pfn, zone->zone_start_pfn);
/* Only scan within a pageblock boundary */
end_pfn = ALIGN(low_pfn + pageblock_nr_pages, pageblock_nr_pages);
/* Do not cross the free scanner or scan within a memory hole */
if (end_pfn > cc->free_pfn || !pfn_valid(low_pfn)) {
cc->migrate_pfn = end_pfn;
return ISOLATE_NONE;
}
The important part is "cc->migrate_pfn = end_pfn;".
(The other 2 compaction fixes you found don't seem to be applicable.)
Ben.
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html