Re: [PATCH 2/5] mm, compaction: simplify handling restart position in free pages scanner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]