Re: mmotm woes, mainly compaction
From: Vlastimil Babka
Date: Mon Apr 18 2016 - 15:14:29 EST
On 04/14/2016 07:24 PM, Vlastimil Babka wrote:
>> > @@ -1459,8 +1459,8 @@ static enum compact_result compact_zone(
>> > zone->compact_cached_migrate_pfn[1] = cc->migrate_pfn;
>> > }
>> >
>> > - if (cc->migrate_pfn == start_pfn)
>> > - cc->whole_zone = true;
>> > + cc->whole_zone = cc->migrate_pfn == start_pfn &&
>> > + cc->free_pfn == pageblock_start_pfn(end_pfn - 1);
>> >
>> > cc->last_migrated_pfn = 0;
> This would be for Michal, but I agree.
So there's an alternative here that wouldn't have the danger of missing
cc->whole_zone multiple time due to races. When resetting either one
scanner to zone boundary, reset the other as well (and set
cc->whole_zone). I think the situations, where not doing that have any
(performance) advantage, are rare.