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:   Wed, 12 Feb 2020 10:25:55 +0800
From:   Wei Yang <richardw.yang@...ux.intel.com>
To:     Mel Gorman <mgorman@...hsingularity.net>
Cc:     Wei Yang <richardw.yang@...ux.intel.com>,
        akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, shakeelb@...gle.com,
        yang.shi@...ux.alibaba.com
Subject: Re: [RFC Patch] mm/vmscan.c: not inherit classzone_idx from previous
 reclaim

On Tue, Feb 11, 2020 at 10:42:23AM +0000, Mel Gorman wrote:
>On Sun, Feb 09, 2020 at 03:41:45PM +0800, Wei Yang wrote:
>> Before commit e716f2eb24de ("mm, vmscan: prevent kswapd sleeping
>> prematurely due to mismatched classzone_idx"), classzone_idx could have
>> two possibilities on a new loop based on whether there is a wakeup
>> during reclaiming:
>> 
>>   * 0 if no wakeup
>>   * the classzone_idx request by wakeup
>> 
>> As described in the changelog, this commit is willing to change the
>> first case to (MAX_NR_ZONES - 1) to avoid some premature sleep. But it
>> does not achieve the goal.
>> 
>> There are two versions of kswapd_classzone_idx() since this change:
>> 
>>   * commit e716f2eb24de ("mm, vmscan: prevent kswapd sleeping
>>     prematurely due to mismatched classzone_idx")
>>   * commit dffcac2cb88e ("mm/vmscan.c: prevent useless kswapd loops")
>> 
>> Both of them would return the classzone_idx we passed as the 2nd
>> parameter when (pgdat->kswapd_classzone_idx == MAX_NR_ZONES). This
>> means if there is no wakeup during reclaiming, we would use
>> classzone_idx in previous round to sleep.
>> 
>
>This is somewhat intended.
>
>> This patch fixes the logic by using (MAX_NR_ZONES - 1) for the first
>> case.
>> 
>
>Ok, what is the user-visible impact that is fixed by this patch or is
>this based on code review only? Please describe the test case exactly
>and the before and after results. I ask because this area is a magnet for
>regressions and intuitive ideas often lead to counter-intuitive results.
>

This is based on code review only. I know your concern. This is an area more
like art then engineering :-)

Would you mind sharing some idea why we intend to inherit the classzone_idx?
And for kswapd_order, we would restart at 0 if no wakeup during reclaim.

I am curious about the idea behind this design :-)

>-- 
>Mel Gorman
>SUSE Labs

-- 
Wei Yang
Help you, Help me

Powered by blists - more mailing lists