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, 23 Jan 2012 00:47:34 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	linux-mm@...ck.org
Cc:	Michal Hocko <mhocko@...e.cz>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Ying Han <yinghan@...gle.com>, Hugh Dickins <hughd@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Hillf Danton <dhillf@...il.com>
Subject: Re: [PATCH] mm: vmscan: ensure reclaiming pages on the lru lists of zone

Hi all

For easy review, it is re-prepared based on 3.3-rc1.

Thanks
Hillf

===cut please===
From: Hillf Danton <dhillf@...il.com>
Subject: [PATCH] mm: vmscan: ensure reclaiming pages on the lru lists of zone

While iterating over memory cgroup hierarchy, pages are reclaimed from each
mem cgroup, and reclaim terminates after a full round-trip. It is possible
that no pages on the lru lists of given zone are reclaimed, as termination
is checked after the reclaiming function.

Mem cgroup iteration is rearranged a bit to make sure that pages are reclaimed
from both mem cgroups and zone.

Signed-off-by: Hillf Danton <dhillf@...il.com>
---

--- a/mm/vmscan.c	Mon Jan 23 00:23:10 2012
+++ b/mm/vmscan.c	Mon Jan 23 00:26:44 2012
@@ -2142,14 +2142,14 @@ static void shrink_zone(int priority, st
 		.zone = zone,
 		.priority = priority,
 	};
-	struct mem_cgroup *memcg;
+	struct mem_cgroup_zone mz = {
+		.zone = zone,
+	};
+	struct mem_cgroup *memcg = NULL;

-	memcg = mem_cgroup_iter(root, NULL, &reclaim);
 	do {
-		struct mem_cgroup_zone mz = {
-			.mem_cgroup = memcg,
-			.zone = zone,
-		};
+		memcg = mem_cgroup_iter(root, memcg, &reclaim);
+		mz.mem_cgroup = memcg;

 		shrink_mem_cgroup_zone(priority, &mz, sc);
 		/*
@@ -2166,7 +2166,6 @@ static void shrink_zone(int priority, st
 			mem_cgroup_iter_break(root, memcg);
 			break;
 		}
-		memcg = mem_cgroup_iter(root, memcg, &reclaim);
 	} while (memcg);
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ