lkml.org 
[lkml]   [2015]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] mm, compaction: simplify handling restart position in free pages scanner
On 01/20/2015 02:27 PM, Zhang Yanfei wrote:
> Hello,
>
> 在 2015/1/19 18:05, Vlastimil Babka 写道:
>> @@ -883,6 +883,8 @@ static void isolate_freepages(struct compact_control *cc)
>> nr_freepages += isolated;
>>
>> /*
>> + * If we isolated enough freepages, or aborted due to async
>> + * compaction being contended, terminate the loop.
>> * Remember where the free scanner should restart next time,
>> * which is where isolate_freepages_block() left off.
>> * But if it scanned the whole pageblock, isolate_start_pfn
>> @@ -891,28 +893,30 @@ static void isolate_freepages(struct compact_control *cc)
>> * In that case we will however want to restart at the start
>> * of the previous pageblock.
>> */
>> - cc->free_pfn = (isolate_start_pfn < block_end_pfn) ?
>> - isolate_start_pfn :
>> - block_start_pfn - pageblock_nr_pages;
>> -
>> - /*
>> - * isolate_freepages_block() might have aborted due to async
>> - * compaction being contended
>> - */
>> - if (cc->contended)
>> + if ((nr_freepages > cc->nr_migratepages) || cc->contended) {
>
> Shouldn't this be nr_freepages >= cc->nr_migratepages?

Ah, of course. Thanks for catching that!



\
 
 \ /
  Last update: 2015-01-20 14:41    [W:0.174 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site