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:   Mon, 6 Mar 2017 11:15:08 +0900
From:   Minchan Kim <minchan@...nel.org>
To:     Anshuman Khandual <khandual@...ux.vnet.ibm.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, kernel-team@....com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...e.com>
Subject: Re: [RFC 06/11] mm: remove SWAP_MLOCK in ttu

Hi Anshuman,

On Fri, Mar 03, 2017 at 06:06:38PM +0530, Anshuman Khandual wrote:
> On 03/02/2017 12:09 PM, Minchan Kim wrote:
> > ttu don't need to return SWAP_MLOCK. Instead, just return SWAP_FAIL
> > because it means the page is not-swappable so it should move to
> > another LRU list(active or unevictable). putback friends will
> > move it to right list depending on the page's LRU flag.
> 
> Right, if it cannot be swapped out there is not much difference with
> SWAP_FAIL once we change the callers who expected to see a SWAP_MLOCK
> return instead.
> 
> > 
> > A side effect is shrink_page_list accounts unevictable list movement
> > by PGACTIVATE but I don't think it corrupts something severe.
> 
> Not sure I got that, could you please elaborate on this. We will still
> activate the page and put it in an appropriate LRU list if it is marked
> mlocked ?

Right. putback_iactive_pages/putback_lru_page has a logic to filter
out unevictable pages and move them to unevictable LRU list so it
doesn't break LRU change behavior but the concern is until now,
we have accounted PGACTIVATE for only evictable LRU list page but
by this change, it accounts it to unevictable LRU list as well.
However, although I don't think it's big problem in real practice,
we can fix it simply with checking PG_mlocked if someone reports.

Thanks.


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ