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: <8631DC5930FA9E468F04F3FD3A5D007214AD7388@USINDEM103.corp.hds.com>
Date:	Fri, 14 Dec 2012 20:17:27 +0000
From:	Satoru Moriya <satoru.moriya@....com>
To:	Rik van Riel <riel@...hat.com>, Michal Hocko <mhocko@...e.cz>
CC:	Johannes Weiner <hannes@...xchg.org>, Mel Gorman <mgorman@...e.de>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	Hugh Dickins <hughd@...gle.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [patch 2/8] mm: vmscan: disregard swappiness shortly before
 going OOM

On 12/14/2012 10:43 AM, Rik van Riel wrote:
> On 12/14/2012 03:37 AM, Michal Hocko wrote:
> 
>> I can answer the later. Because memsw comes with its price and 
>> swappiness is much cheaper. On the other hand it makes sense that
>> swappiness==0 doesn't swap at all. Or do you think we should get back 
>> to _almost_ doesn't swap at all?
> 
> swappiness==0 will swap in emergencies, specifically when we have 
> almost no page cache left, we will still swap things out:
> 
>         if (global_reclaim(sc)) {
>                 free  = zone_page_state(zone, NR_FREE_PAGES);
>                 if (unlikely(file + free <= high_wmark_pages(zone))) {
>                         /*
>                          * If we have very few page cache pages, force-scan
>                          * anon pages.
>                          */
>                         fraction[0] = 1;
>                         fraction[1] = 0;
>                         denominator = 1;
>                         goto out;
> 
> This makes sense, because people who set swappiness==0 but do have 
> swap space available would probably prefer some emergency swapping 
> over an OOM kill.

This behavior is reasonable for global reclaim to me. But when
we hit this condition, it may be better to print some messages
to notify the user who set swappiness==0 of anon page scan.

Regards,
Satoru

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ