lkml.org 
[lkml]   [2012]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [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
\
 
 \ /
  Last update: 2012-03-03 00:45    [W:0.229 / U:19.060 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site