packages (LINUX_2_6_38): kernel/kernel.spec, kernel/kernel-small_fixes.patc...
arekm
arekm at pld-linux.org
Fri Nov 18 10:23:41 CET 2011
Author: arekm Date: Fri Nov 18 09:23:41 2011 GMT
Module: packages Tag: LINUX_2_6_38
---- Log message:
- rel 7; another cgroup OOM fix
---- Files affected:
packages/kernel:
kernel.spec (1.924.2.11 -> 1.924.2.12) , kernel-small_fixes.patch (1.25.2.8 -> 1.25.2.9)
---- Diffs:
================================================================
Index: packages/kernel/kernel.spec
diff -u packages/kernel/kernel.spec:1.924.2.11 packages/kernel/kernel.spec:1.924.2.12
--- packages/kernel/kernel.spec:1.924.2.11 Thu Nov 10 06:57:40 2011
+++ packages/kernel/kernel.spec Fri Nov 18 10:23:27 2011
@@ -95,7 +95,7 @@
%define basever 2.6.38
%define postver .8
-%define rel 6
+%define rel 7
%define _enable_debug_packages 0
@@ -1577,6 +1577,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.924.2.12 2011/11/18 09:23:27 arekm
+- rel 7; another cgroup OOM fix
+
Revision 1.924.2.11 2011/11/10 05:57:40 arekm
- rel 6; cgroup memory limit fixes
================================================================
Index: packages/kernel/kernel-small_fixes.patch
diff -u packages/kernel/kernel-small_fixes.patch:1.25.2.8 packages/kernel/kernel-small_fixes.patch:1.25.2.9
--- packages/kernel/kernel-small_fixes.patch:1.25.2.8 Thu Nov 10 06:57:40 2011
+++ packages/kernel/kernel-small_fixes.patch Fri Nov 18 10:23:36 2011
@@ -909,3 +909,76 @@
}
static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+commit 23751be0094012eb6b4756fa80ca54b3eb83069f
+Author: Johannes Weiner <jweiner at redhat.com>
+Date: Thu Aug 25 15:59:16 2011 -0700
+
+ memcg: fix hierarchical oom locking
+
+ Commit 79dfdaccd1d5 ("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 at redhat.com>
+ Acked-by: Michal Hocko <mhocko at suse.cz>
+ Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>
+ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+
+diff --git a/mm/memcontrol.c b/mm/memcontrol.c
+index 0e40f02..ebd1e86 100644
+--- a/mm/memcontrol.c
++++ b/mm/memcontrol.c
+@@ -1841,29 +1841,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
+@@ -1877,8 +1871,7 @@ static bool mem_cgroup_oom_lock(struct mem_cgroup *mem)
+ }
+ iter->oom_lock = false;
+ }
+-done:
+- return lock_count;
++ return false;
+ }
+
+ /*
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.924.2.11&r2=1.924.2.12&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-small_fixes.patch?r1=1.25.2.8&r2=1.25.2.9&f=u
More information about the pld-cvs-commit
mailing list