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] [day] [month] [year] [list]
Message-ID: <20160719142534.GD10438@techsingularity.net>
Date:	Tue, 19 Jul 2016 15:25:34 +0100
From:	Mel Gorman <mgorman@...hsingularity.net>
To:	Joonsoo Kim <iamjoonsoo.kim@....com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux-MM <linux-mm@...ck.org>, Rik van Riel <riel@...riel.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Johannes Weiner <hannes@...xchg.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 04/31] mm, vmscan: begin reclaiming pages on a per-node
 basis

On Tue, Jul 19, 2016 at 05:30:31PM +0900, Joonsoo Kim wrote:
> On Mon, Jul 18, 2016 at 03:27:14PM +0100, Mel Gorman wrote:
> > On Mon, Jul 18, 2016 at 01:11:22PM +0100, Mel Gorman wrote:
> > > The all_unreclaimable logic is related to the number of pages scanned
> > > but currently pages skipped contributes to pages scanned. That is one
> > > possibility. The other is that if all pages scanned are skipped then the
> > > OOM killer can believe there is zero progress.
> > > 
> > > Try this to start with;
> > > 
> > 
> > And if that fails, try this heavier handed version that will scan the full
> > LRU potentially to isolate at least a single page if it's available for
> > zone-constrained allocations. It's compile-tested only
> 
> I tested both patches but they don't work for me. Notable difference
> is that all_unreclaimable is now "no".
> 

Ok, that's good to know at least. It at least indicates that skips
accounted as scans are a contributory factor.

> Just attach the oops log from heavier version.
> 

Apparently, isolating at least one page is not enough. Please try the
following. If it fails, please post the test script you're using. I can
simulate what you describe (mapped reads combined with lots of forks)
but no guarantee I'll get it exactly right. I think it's ok to not
account skips as scans because the skips are already accounted for.

diff --git a/mm/vmscan.c b/mm/vmscan.c
index a6f31617a08c..0dc443b52228 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1415,7 +1415,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
 	LIST_HEAD(pages_skipped);
 
 	for (scan = 0; scan < nr_to_scan && nr_taken < nr_to_scan &&
-					!list_empty(src); scan++) {
+					!list_empty(src);) {
 		struct page *page;
 
 		page = lru_to_page(src);
@@ -1428,6 +1428,9 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
 			nr_skipped[page_zonenum(page)]++;
 			continue;
 		}
+`
+		/* Pages skipped do not contribute to scan */
+		scan++;
 
 		switch (__isolate_lru_page(page, mode)) {
 		case 0:
-- 
Mel Gorman
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ