]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm: invoke oom-killer from page fault
authorNick Piggin <npiggin@suse.de>
Tue, 6 Jan 2009 22:38:59 +0000 (14:38 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:58:58 +0000 (15:58 -0800)
commit1c0fe6e3bda0464728c23c8d84aa47567e8b716c
tree64f7903ee7757b14464e8a06bf91f5c4d5a8ba56
parent5bd1455c239672081d0e7f086e899b8cbc7a9844
mm: invoke oom-killer from page fault

Rather than have the pagefault handler kill a process directly if it gets
a VM_FAULT_OOM, have it call into the OOM killer.

With increasingly sophisticated oom behaviour (cpusets, memory cgroups,
oom killing throttling, oom priority adjustment or selective disabling,
panic on oom, etc), it's silly to unconditionally kill the faulting
process at page fault time.  Create a hook for pagefault oom path to call
into instead.

Only converted x86 and uml so far.

[akpm@linux-foundation.org: make __out_of_memory() static]
[akpm@linux-foundation.org: fix comment]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Jeff Dike <jdike@addtoit.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/kernel/trap.c
arch/x86/mm/fault.c
include/linux/mm.h
mm/oom_kill.c