• Nick Piggin's avatar
    mm: invoke oom-killer from page fault · 1c0fe6e3
    Nick Piggin authored
    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: default avatarNick Piggin <npiggin@suse.de>
    Cc: Jeff Dike <jdike@addtoit.com>
    Acked-by: default avatarIngo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    1c0fe6e3
fault.c 22.9 KB