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-next>] [day] [month] [year] [list]
Date:	Mon, 02 May 2011 15:07:29 -0500
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Chris Mason <chris.mason@...cle.com>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Paul Menage <menage@...gle.com>,
	Li Zefan <lizf@...fujitsu.com>,
	containers@...ts.linux-foundation.org
Subject: memcg: fix fatal livelock in kswapd

The fatal livelock in kswapd, reported in this thread:

http://marc.info/?t=130392066000001

Is mitigateable if we prevent the cgroups code being so aggressive in
its zone shrinking (by reducing it's default shrink from 0 [everything]
to DEF_PRIORITY [some things]).  This will have an obvious knock on
effect to cgroup accounting, but it's better than hanging systems.

Signed-off-by: James Bottomley <James.Bottomley@...e.de>

---

>From 74b62fc417f07e1411d98181631e4e097c8e3e68 Mon Sep 17 00:00:00 2001
From: James Bottomley <James.Bottomley@...senPartnership.com>
Date: Mon, 2 May 2011 14:56:29 -0500
Subject: [PATCH] vmscan: move containers scan back to default priority


diff --git a/mm/vmscan.c b/mm/vmscan.c
index f6b435c..46cde92 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2173,8 +2173,12 @@ unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
 	 * if we don't reclaim here, the shrink_zone from balance_pgdat
 	 * will pick up pages from other mem cgroup's as well. We hack
 	 * the priority and make it zero.
+	 *
+	 * FIXME: jejb: zero here was causing a livelock in the
+	 * shrinker so changed to DEF_PRIORITY to fix this. Now need to
+	 * sort out cgroup accounting.
 	 */
-	shrink_zone(0, zone, &sc);
+	shrink_zone(DEF_PRIORITY, zone, &sc);
 
 	trace_mm_vmscan_memcg_softlimit_reclaim_end(sc.nr_reclaimed);
 


--
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