From mboxrd@z Thu Jan 1 00:00:00 1970 From: npiggin@suse.de Subject: [patch 01/14] alpha: invoke oom-killer from page fault Date: Fri, 23 Apr 2010 02:06:14 +1000 Message-ID: <20100422161222.762354051@suse.de> References: <20100422160613.723698029@suse.de> Return-path: Content-Disposition: inline; filename=alpha-pagefault-use-oom.patch Sender: linux-arch-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arch@vger.kernel.org Cc: David Rientjes , Andrew Morton , linux-alpha@vger.kernel.org, Richard Henderson As explained in commit 1c0fe6e3bd, we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Cc: linux-alpha@vger.kernel.org Cc: Richard Henderson Cc: linux-arch@vger.kernel.org Signed-off-by: Nick Piggin --- Index: linux-2.6/arch/alpha/mm/fault.c =================================================================== --- linux-2.6.orig/arch/alpha/mm/fault.c +++ linux-2.6/arch/alpha/mm/fault.c @@ -188,16 +188,10 @@ do_page_fault(unsigned long address, uns /* We ran out of memory, or some other thing happened to us that made us unable to handle the page fault gracefully. */ out_of_memory: - if (is_global_init(current)) { - yield(); - down_read(&mm->mmap_sem); - goto survive; - } - printk(KERN_ALERT "VM: killing process %s(%d)\n", - current->comm, task_pid_nr(current)); if (!user_mode(regs)) goto no_context; - do_group_exit(SIGKILL); + pagefault_out_of_memory(); + return; do_sigbus: /* Send a sigbus, regardless of whether we were in kernel