All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20110809153732.GC13411@redhat.com>

diff --git a/a/1.txt b/N1/1.txt
index aa39ef6..fc3ab30 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -30,77 +30,3 @@ On Tue, Aug 09, 2011 at 05:22:18PM +0200, Michal Hocko wrote:
 Ah, right you are.  Here is an update.
 
 ---
->From 86b36904033e6c6a1af4716e9deef13ebd31e64c Mon Sep 17 00:00:00 2001
-From: Johannes Weiner <jweiner@redhat.com>
-Date: Tue, 9 Aug 2011 15:31:30 +0200
-Subject: [patch] memcg: fix hierarchical oom locking
-
-Commit "79dfdac memcg: make oom_lock 0 and 1 based rather than
-counter" tried to oom lock the hierarchy and roll back upon
-encountering an already locked memcg.
-
-The code is confused when it comes to detecting a locked memcg,
-though, so it would fail and rollback after locking one memcg and
-encountering an unlocked second one.
-
-The result is that oom-locking hierarchies fails unconditionally and
-that every oom killer invocation simply goes to sleep on the oom
-waitqueue forever.  The tasks practically hang forever without anyone
-intervening, possibly holding locks that trip up unrelated tasks, too.
-
-Signed-off-by: Johannes Weiner <jweiner@redhat.com>
-Acked-by: Michal Hocko <mhocko@suse.cz>
----
- mm/memcontrol.c |   17 +++++------------
- 1 files changed, 5 insertions(+), 12 deletions(-)
-
-diff --git a/mm/memcontrol.c b/mm/memcontrol.c
-index c6faa32..f39c8fb 100644
---- a/mm/memcontrol.c
-+++ b/mm/memcontrol.c
-@@ -1843,29 +1843,23 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
-  */
- static bool mem_cgroup_oom_lock(struct mem_cgroup *mem)
- {
--	int lock_count = -1;
- 	struct mem_cgroup *iter, *failed = NULL;
- 	bool cond = true;
- 
- 	for_each_mem_cgroup_tree_cond(iter, mem, cond) {
--		bool locked = iter->oom_lock;
--
--		iter->oom_lock = true;
--		if (lock_count == -1)
--			lock_count = iter->oom_lock;
--		else if (lock_count != locked) {
-+		if (iter->oom_lock) {
- 			/*
- 			 * this subtree of our hierarchy is already locked
- 			 * so we cannot give a lock.
- 			 */
--			lock_count = 0;
- 			failed = iter;
- 			cond = false;
--		}
-+		} else
-+			iter->oom_lock = true;
- 	}
- 
- 	if (!failed)
--		goto done;
-+		return true;
- 
- 	/*
- 	 * OK, we failed to lock the whole subtree so we have to clean up
-@@ -1879,8 +1873,7 @@ static bool mem_cgroup_oom_lock(struct mem_cgroup *mem)
- 		}
- 		iter->oom_lock = false;
- 	}
--done:
--	return lock_count;
-+	return false;
- }
- 
- /*
--- 
-1.7.6
diff --git a/a/content_digest b/N1/content_digest
index a20187a..955ac96 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -44,80 +44,6 @@
  "\n"
  "Ah, right you are.  Here is an update.\n"
  "\n"
- "---\n"
- ">From 86b36904033e6c6a1af4716e9deef13ebd31e64c Mon Sep 17 00:00:00 2001\n"
- "From: Johannes Weiner <jweiner@redhat.com>\n"
- "Date: Tue, 9 Aug 2011 15:31:30 +0200\n"
- "Subject: [patch] memcg: fix hierarchical oom locking\n"
- "\n"
- "Commit \"79dfdac memcg: make oom_lock 0 and 1 based rather than\n"
- "counter\" tried to oom lock the hierarchy and roll back upon\n"
- "encountering an already locked memcg.\n"
- "\n"
- "The code is confused when it comes to detecting a locked memcg,\n"
- "though, so it would fail and rollback after locking one memcg and\n"
- "encountering an unlocked second one.\n"
- "\n"
- "The result is that oom-locking hierarchies fails unconditionally and\n"
- "that every oom killer invocation simply goes to sleep on the oom\n"
- "waitqueue forever.  The tasks practically hang forever without anyone\n"
- "intervening, possibly holding locks that trip up unrelated tasks, too.\n"
- "\n"
- "Signed-off-by: Johannes Weiner <jweiner@redhat.com>\n"
- "Acked-by: Michal Hocko <mhocko@suse.cz>\n"
- "---\n"
- " mm/memcontrol.c |   17 +++++------------\n"
- " 1 files changed, 5 insertions(+), 12 deletions(-)\n"
- "\n"
- "diff --git a/mm/memcontrol.c b/mm/memcontrol.c\n"
- "index c6faa32..f39c8fb 100644\n"
- "--- a/mm/memcontrol.c\n"
- "+++ b/mm/memcontrol.c\n"
- "@@ -1843,29 +1843,23 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,\n"
- "  */\n"
- " static bool mem_cgroup_oom_lock(struct mem_cgroup *mem)\n"
- " {\n"
- "-\tint lock_count = -1;\n"
- " \tstruct mem_cgroup *iter, *failed = NULL;\n"
- " \tbool cond = true;\n"
- " \n"
- " \tfor_each_mem_cgroup_tree_cond(iter, mem, cond) {\n"
- "-\t\tbool locked = iter->oom_lock;\n"
- "-\n"
- "-\t\titer->oom_lock = true;\n"
- "-\t\tif (lock_count == -1)\n"
- "-\t\t\tlock_count = iter->oom_lock;\n"
- "-\t\telse if (lock_count != locked) {\n"
- "+\t\tif (iter->oom_lock) {\n"
- " \t\t\t/*\n"
- " \t\t\t * this subtree of our hierarchy is already locked\n"
- " \t\t\t * so we cannot give a lock.\n"
- " \t\t\t */\n"
- "-\t\t\tlock_count = 0;\n"
- " \t\t\tfailed = iter;\n"
- " \t\t\tcond = false;\n"
- "-\t\t}\n"
- "+\t\t} else\n"
- "+\t\t\titer->oom_lock = true;\n"
- " \t}\n"
- " \n"
- " \tif (!failed)\n"
- "-\t\tgoto done;\n"
- "+\t\treturn true;\n"
- " \n"
- " \t/*\n"
- " \t * OK, we failed to lock the whole subtree so we have to clean up\n"
- "@@ -1879,8 +1873,7 @@ static bool mem_cgroup_oom_lock(struct mem_cgroup *mem)\n"
- " \t\t}\n"
- " \t\titer->oom_lock = false;\n"
- " \t}\n"
- "-done:\n"
- "-\treturn lock_count;\n"
- "+\treturn false;\n"
- " }\n"
- " \n"
- " /*\n"
- "-- \n"
- 1.7.6
+ ---
 
-a1765760d041debe3c19c63bcbccd823d381f8cf0f2fe71023dd167af73f9f67
+d4fe7f946be49a0aa593306b6b9bddf74d720c6d360cb80ba7cb5cffb2c7656c

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.