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]
Message-ID: <65795E11DBF1E645A09CEC7EAEE94B9CB945618C@USINDEVS02.corp.hds.com>
Date:	Fri, 2 Mar 2012 18:43:01 -0500
From:	Satoru Moriya <satoru.moriya@....com>
To:	Rik van Riel <riel@...hat.com>
CC:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"lwoodman@...hat.com" <lwoodman@...hat.com>,
	"jweiner@...hat.com" <jweiner@...hat.com>,
	"shaohua.li@...el.com" <shaohua.li@...el.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	"dle-develop@...ts.sourceforge.net" 
	<dle-develop@...ts.sourceforge.net>,
	Seiji Aguchi <seiji.aguchi@....com>
Subject: RE: [RFC][PATCH] avoid swapping out with swappiness==0

Hi Rik,

Thank you for reviewing.

On 03/02/2012 05:47 PM, Rik van Riel wrote:
> On 03/02/2012 12:36 PM, Satoru Moriya wrote:
>> @@ -1999,7 +1999,7 @@ out:
>>           unsigned long scan;
>>
>>           scan = zone_nr_lru_pages(mz, lru);
>> -        if (priority || noswap) {
>> +        if (priority || noswap || !vmscan_swappiness(mz, sc)) {
>>               scan>>= priority;
>>               if (!scan&&  force_scan)
>>                   scan = SWAP_CLUSTER_MAX;
> 
> However, I do not understand why we fail to scale the number of pages 
> we want to scan with priority if "noswap".
> 
> For that matter, surely if we do not want to swap out anonymous pages, 
> we WANT to go into this if branch, in order to make sure we set "scan" 
> to 0?
> 
> scan = div64_u64(scan * fraction[file], denominator);
> 
> With your patch and swappiness=0, or no swap space, it looks like we 
> do not zero out "scan" and may end up scanning anonymous pages.

With my patch, if swappiness==0 or noswap==1, fraction[file] is
set to 0. As a result, scan will be set to 0, too.

> Am I overlooking something?  Is this correct?
> 
> I mean, it is Friday and my brain is very full...

Have a nice weekend ;)

Regards,
Satoru

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ