Commit 3ff56696 authored by David Rientjes's avatar David Rientjes Committed by Linus Torvalds

oom: do not take callback_mutex

Since no task descriptor's 'cpuset' field is dereferenced in the execution of
the OOM killer anymore, it is no longer necessary to take callback_mutex.

[akpm@linux-foundation.org: restore cpuset_lock for other patches]
Cc: Andrea Arcangeli <andrea@suse.de>
Acked-by: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bbe373f2
...@@ -463,7 +463,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) ...@@ -463,7 +463,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
* NUMA) that may require different handling. * NUMA) that may require different handling.
*/ */
constraint = constrained_alloc(zonelist, gfp_mask); constraint = constrained_alloc(zonelist, gfp_mask);
cpuset_lock();
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
switch (constraint) { switch (constraint) {
...@@ -495,7 +494,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) ...@@ -495,7 +494,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
/* Found nothing?!?! Either we hang forever, or we panic. */ /* Found nothing?!?! Either we hang forever, or we panic. */
if (!p) { if (!p) {
read_unlock(&tasklist_lock); read_unlock(&tasklist_lock);
cpuset_unlock();
panic("Out of memory and no killable processes...\n"); panic("Out of memory and no killable processes...\n");
} }
...@@ -508,7 +506,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) ...@@ -508,7 +506,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
out: out:
read_unlock(&tasklist_lock); read_unlock(&tasklist_lock);
cpuset_unlock();
/* /*
* Give "p" a good chance of killing itself before we * Give "p" a good chance of killing itself before we
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment