lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Jan 2015 14:31:44 +0100
From:	Vlastimil Babka <vbabka@...e.cz>
To:	Zhang Yanfei <zhangyanfei.yes@...il.com>, linux-mm@...ck.org
CC:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Minchan Kim <minchan@...nel.org>, Mel Gorman <mgorman@...e.de>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	Michal Nazarewicz <mina86@...a86.com>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Christoph Lameter <cl@...ux.com>,
	Rik van Riel <riel@...hat.com>,
	David Rientjes <rientjes@...gle.com>
Subject: Re: [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!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ