]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- rel 2; another cgroup OOM fix
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 18 Nov 2011 09:24:43 +0000 (09:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    kernel-small_fixes.patch -> 1.43.2.5
    kernel.spec -> 1.987.2.6

kernel-small_fixes.patch
kernel.spec

index bcef89f7df43626d4b2724a043724052045587b3..c71c45e6c6970e8aab5e1cf98b45d42609719f86 100644 (file)
@@ -920,3 +920,76 @@ index a58bbeb..3c9f3aa 100644
  }
  
  static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+commit 23751be0094012eb6b4756fa80ca54b3eb83069f
+Author: Johannes Weiner <jweiner@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@redhat.com>
+    Acked-by: Michal Hocko <mhocko@suse.cz>
+    Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+    Signed-off-by: Linus Torvalds <torvalds@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;
+ }
+ /*
index 4e3e4d294542092247fa518659d2ae527e2fdeb1..39dd3dff41ad7a1f0746f6b3fa623c5f1cdc1cf9 100644 (file)
@@ -94,7 +94,7 @@
 
 %define                basever         3.0
 %define                postver         .9
-%define                rel             1
+%define                rel             2
 
 %define                _enable_debug_packages                  0
 
This page took 0.071987 seconds and 4 git commands to generate.