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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Jun 2016 16:59:55 +0800
From:	"Hillf Danton" <hillf.zj@...baba-inc.com>
To:	"'Mel Gorman'" <mgorman@...hsingularity.net>
Cc:	"'Johannes Weiner'" <hannes@...xchg.org>,
	"'Vlastimil Babka'" <vbabka@...e.cz>,
	"'linux-kernel'" <linux-kernel@...r.kernel.org>,
	<linux-mm@...ck.org>, "Andrew Morton" <akpm@...ux-foundation.org>
Subject: [PATCH] mm, vmscan: Make kswapd reclaim no more than needed

We stop reclaiming pages if any eligible zone is balanced.

Signed-off-by: Hillf Danton <hillf.zj@...baba-inc.com>
---

--- a/mm/vmscan.c	Thu Jun 23 17:56:34 2016
+++ b/mm/vmscan.c	Fri Jun 24 16:45:58 2016
@@ -3185,15 +3185,10 @@ static int balance_pgdat(pg_data_t *pgda
 			if (!populated_zone(zone))
 				continue;
 
-			if (!zone_balanced(zone, sc.order, classzone_idx)) {
-				classzone_idx = i;
-				break;
-			}
+			if (zone_balanced(zone, sc.order, classzone_idx))
+				goto out;
 		}
 
-		if (i < 0)
-			goto out;
-
 		/*
 		 * Do some background aging of the anon list, to give
 		 * pages a chance to be referenced before reclaiming. All
@@ -3236,19 +3231,6 @@ static int balance_pgdat(pg_data_t *pgda
 		/* Check if kswapd should be suspending */
 		if (try_to_freeze() || kthread_should_stop())
 			break;
-
-		/*
-		 * Stop reclaiming if any eligible zone is balanced and clear
-		 * node writeback or congested.
-		 */
-		for (i = 0; i <= classzone_idx; i++) {
-			zone = pgdat->node_zones + i;
-			if (!populated_zone(zone))
-				continue;
-
-			if (zone_balanced(zone, sc.order, classzone_idx))
-				goto out;
-		}
 
 		/*
 		 * Raise priority if scanning rate is too low or there was no
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ