* [patch 13/14] sh: invoke oom-killer from page fault [not found] <20100422160613.723698029@suse.de> @ 2010-04-22 16:06 ` npiggin 2010-04-22 20:58 ` David Rientjes 2010-04-26 6:46 ` Paul Mundt 0 siblings, 2 replies; 3+ messages in thread From: npiggin @ 2010-04-22 16:06 UTC (permalink / raw) To: linux-arch; +Cc: David Rientjes, Andrew Morton, linux-sh, Paul Mundt 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-sh@vger.kernel.org Cc: Paul Mundt <lethal@linux-sh.org> Cc: linux-arch@vger.kernel.org Signed-off-by: Nick Piggin <npiggin@suse.de> --- Index: linux-2.6/arch/sh/mm/fault_32.c =================================--- linux-2.6.orig/arch/sh/mm/fault_32.c +++ linux-2.6/arch/sh/mm/fault_32.c @@ -290,15 +290,10 @@ no_context: */ out_of_memory: up_read(&mm->mmap_sem); - if (is_global_init(current)) { - yield(); - down_read(&mm->mmap_sem); - goto survive; - } - printk("VM: killing process %s\n", tsk->comm); - if (user_mode(regs)) - do_group_exit(SIGKILL); - goto no_context; + if (!user_mode(regs)) + goto no_context; + pagefault_out_of_memory(); + return; do_sigbus: up_read(&mm->mmap_sem); Index: linux-2.6/arch/sh/mm/tlbflush_64.c =================================--- linux-2.6.orig/arch/sh/mm/tlbflush_64.c +++ linux-2.6/arch/sh/mm/tlbflush_64.c @@ -294,22 +294,11 @@ no_context: * us unable to handle the page fault gracefully. */ out_of_memory: - if (is_global_init(current)) { - panic("INIT out of memory\n"); - yield(); - goto survive; - } - printk("fault:Out of memory\n"); up_read(&mm->mmap_sem); - if (is_global_init(current)) { - yield(); - down_read(&mm->mmap_sem); - goto survive; - } - printk("VM: killing process %s\n", tsk->comm); - if (user_mode(regs)) - do_group_exit(SIGKILL); - goto no_context; + if (!user_mode(regs)) + goto no_context; + pagefault_out_of_memory(); + return; do_sigbus: printk("fault:Do sigbus\n"); ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 13/14] sh: invoke oom-killer from page fault 2010-04-22 16:06 ` [patch 13/14] sh: invoke oom-killer from page fault npiggin @ 2010-04-22 20:58 ` David Rientjes 2010-04-26 6:46 ` Paul Mundt 1 sibling, 0 replies; 3+ messages in thread From: David Rientjes @ 2010-04-22 20:58 UTC (permalink / raw) To: npiggin; +Cc: linux-arch, Andrew Morton, linux-sh, Paul Mundt On Fri, 23 Apr 2010, npiggin@suse.de wrote: > 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-sh@vger.kernel.org > Cc: Paul Mundt <lethal@linux-sh.org> > Cc: linux-arch@vger.kernel.org > Signed-off-by: Nick Piggin <npiggin@suse.de> Acked-by: David Rientjes <rientjes@google.com> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 13/14] sh: invoke oom-killer from page fault 2010-04-22 16:06 ` [patch 13/14] sh: invoke oom-killer from page fault npiggin 2010-04-22 20:58 ` David Rientjes @ 2010-04-26 6:46 ` Paul Mundt 1 sibling, 0 replies; 3+ messages in thread From: Paul Mundt @ 2010-04-26 6:46 UTC (permalink / raw) To: npiggin; +Cc: linux-arch, David Rientjes, Andrew Morton, linux-sh On Fri, Apr 23, 2010 at 02:06:26AM +1000, npiggin@suse.de wrote: > 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-sh@vger.kernel.org > Cc: Paul Mundt <lethal@linux-sh.org> > Cc: linux-arch@vger.kernel.org > Signed-off-by: Nick Piggin <npiggin@suse.de> Applied with David's Acked-by, thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-26 6:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100422160613.723698029@suse.de>
2010-04-22 16:06 ` [patch 13/14] sh: invoke oom-killer from page fault npiggin
2010-04-22 20:58 ` David Rientjes
2010-04-26 6:46 ` Paul Mundt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).