diff for duplicates of <20110809140312.GA2265@redhat.com> diff --git a/a/1.txt b/N1/1.txt index 96ae593..76ed27a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -46,70 +46,3 @@ progress. Here is a patch that rectified things for me. --- ->From c4b52cbe01ed67d6487a96850400cdf5a9de91aa 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 pretty 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> ---- - mm/memcontrol.c | 14 ++++---------- - 1 files changed, 4 insertions(+), 10 deletions(-) - -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index 930de94..649c568 100644 ---- a/mm/memcontrol.c -+++ b/mm/memcontrol.c -@@ -1841,25 +1841,19 @@ 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) -@@ -1878,7 +1872,7 @@ static bool mem_cgroup_oom_lock(struct mem_cgroup *mem) - iter->oom_lock = false; - } - done: -- return lock_count; -+ return failed == NULL; - } - - /* --- -1.7.6 diff --git a/a/content_digest b/N1/content_digest index f07cd21..a944044 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -58,73 +58,6 @@ "\n" "Here is a patch that rectified things for me.\n" "\n" - "---\n" - ">From c4b52cbe01ed67d6487a96850400cdf5a9de91aa 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 pretty 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" - "---\n" - " mm/memcontrol.c | 14 ++++----------\n" - " 1 files changed, 4 insertions(+), 10 deletions(-)\n" - "\n" - "diff --git a/mm/memcontrol.c b/mm/memcontrol.c\n" - "index 930de94..649c568 100644\n" - "--- a/mm/memcontrol.c\n" - "+++ b/mm/memcontrol.c\n" - "@@ -1841,25 +1841,19 @@ 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" - "@@ -1878,7 +1872,7 @@ static bool mem_cgroup_oom_lock(struct mem_cgroup *mem)\n" - " \t\titer->oom_lock = false;\n" - " \t}\n" - " done:\n" - "-\treturn lock_count;\n" - "+\treturn failed == NULL;\n" - " }\n" - " \n" - " /*\n" - "-- \n" - 1.7.6 + --- -d04f4568b8ff2b9701376bcb04994215b40a2857afc32a91bce5c03255e7d76f +9245e9932dd44fd522d18c211e74860dbaa127643f8b1d2b4975288a793e7acb
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.