aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2007-10-17 02:25:58 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:46 -0400
commitbbe373f2c60b2aa36c3231734a5afc5271a06718 (patch)
tree00146d69594672ca41e35be8ff9b349e8751ab5c /mm/oom_kill.c
parent7213f5066fc8a17c78389fe245de522b5cf0648a (diff)
oom: compare cpuset mems_allowed instead of exclusive ancestors
Instead of testing for overlap in the memory nodes of the the nearest exclusive ancestor of both current and the candidate task, it is better to simply test for intersection between the task's mems_allowed in their task descriptors. This does not require taking callback_mutex since it is only used as a hint in the badness scoring. Tasks that do not have an intersection in their mems_allowed with the current task are not explicitly restricted from being OOM killed because it is quite possible that the candidate task has allocated memory there before and has since changed its mems_allowed. Cc: Andrea Arcangeli <andrea@suse.de> Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 5c5aa7380bd1..d9bba82923d5 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -143,7 +143,7 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
143 * because p may have allocated or otherwise mapped memory on 143 * because p may have allocated or otherwise mapped memory on
144 * this node before. However it will be less likely. 144 * this node before. However it will be less likely.
145 */ 145 */
146 if (!cpuset_excl_nodes_overlap(p)) 146 if (!cpuset_mems_allowed_intersects(current, p))
147 points /= 8; 147 points /= 8;
148 148
149 /* 149 /*