diff options
author | David Rientjes <rientjes@google.com> | 2012-08-01 01:42:37 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-01 03:42:41 +0200 |
commit | 4f774b912dd1d5752cd33b696509531b0321c3e0 (patch) | |
tree | 12d30b642d655c3cf75893f9619afe815c0a7932 /mm/memblock.c | |
parent | hugetlb/cgroup: remove exclude and wakeup rmdir calls from migrate (diff) | |
download | linux-4f774b912dd1d5752cd33b696509531b0321c3e0.tar.xz linux-4f774b912dd1d5752cd33b696509531b0321c3e0.zip |
mm, oom: do not schedule if current has been killed
The oom killer currently schedules away from current in an uninterruptible
sleep if it does not have access to memory reserves. It's possible that
current was killed because it shares memory with the oom killed thread or
because it was killed by the user in the interim, however.
This patch only schedules away from current if it does not have a pending
kill, i.e. if it does not share memory with the oom killed thread. It's
possible that it will immediately retry its memory allocation and fail,
but it will immediately be given access to memory reserves if it calls the
oom killer again.
This prevents the delay of memory freeing when threads that share memory
with the oom killed thread get unnecessarily scheduled.
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
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>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions