* [patch 01/14] alpha: invoke oom-killer from page fault
[not found] <20100422160613.723698029@suse.de>
@ 2010-04-22 16:06 ` npiggin
2010-04-22 20:46 ` David Rientjes
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: npiggin @ 2010-04-22 16:06 UTC (permalink / raw)
To: linux-arch; +Cc: David Rientjes, Andrew Morton, linux-alpha, Richard Henderson
[-- Attachment #1: alpha-pagefault-use-oom.patch --]
[-- Type: text/plain, Size: 1105 bytes --]
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 <rth@twiddle.net>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Nick Piggin <npiggin@suse.de>
---
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 01/14] alpha: invoke oom-killer from page fault
2010-04-22 16:06 ` [patch 01/14] alpha: invoke oom-killer from page fault npiggin
@ 2010-04-22 20:46 ` David Rientjes
2010-04-26 20:32 ` David Rientjes
2010-04-28 2:58 ` Matt Turner
2 siblings, 0 replies; 5+ messages in thread
From: David Rientjes @ 2010-04-22 20:46 UTC (permalink / raw)
To: npiggin; +Cc: linux-arch, Andrew Morton, linux-alpha, Richard Henderson
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-alpha@vger.kernel.org
> Cc: Richard Henderson <rth@twiddle.net>
> 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] 5+ messages in thread
* Re: [patch 01/14] alpha: invoke oom-killer from page fault
2010-04-22 16:06 ` [patch 01/14] alpha: invoke oom-killer from page fault npiggin
2010-04-22 20:46 ` David Rientjes
@ 2010-04-26 20:32 ` David Rientjes
2010-04-28 2:58 ` Matt Turner
2 siblings, 0 replies; 5+ messages in thread
From: David Rientjes @ 2010-04-26 20:32 UTC (permalink / raw)
To: npiggin; +Cc: linux-arch, Andrew Morton, linux-alpha, Richard Henderson
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-alpha@vger.kernel.org
> Cc: Richard Henderson <rth@twiddle.net>
> 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] 5+ messages in thread
* Re: [patch 01/14] alpha: invoke oom-killer from page fault
2010-04-22 16:06 ` [patch 01/14] alpha: invoke oom-killer from page fault npiggin
2010-04-22 20:46 ` David Rientjes
2010-04-26 20:32 ` David Rientjes
@ 2010-04-28 2:58 ` Matt Turner
2010-04-28 3:30 ` Matt Turner
2 siblings, 1 reply; 5+ messages in thread
From: Matt Turner @ 2010-04-28 2:58 UTC (permalink / raw)
To: npiggin
Cc: linux-arch, David Rientjes, Andrew Morton, linux-alpha,
Richard Henderson
On Thu, Apr 22, 2010 at 12:06 PM, <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-alpha@vger.kernel.org
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: linux-arch@vger.kernel.org
> Signed-off-by: Nick Piggin <npiggin@suse.de>
> ---
> 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
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Thanks, added to my tree.
Matt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 01/14] alpha: invoke oom-killer from page fault
2010-04-28 2:58 ` Matt Turner
@ 2010-04-28 3:30 ` Matt Turner
0 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2010-04-28 3:30 UTC (permalink / raw)
To: npiggin
Cc: linux-arch, David Rientjes, Andrew Morton, linux-alpha,
Richard Henderson
On Tue, Apr 27, 2010 at 10:58 PM, Matt Turner <mattst88@gmail.com> wrote:
> On Thu, Apr 22, 2010 at 12:06 PM, <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-alpha@vger.kernel.org
>> Cc: Richard Henderson <rth@twiddle.net>
>> Cc: linux-arch@vger.kernel.org
>> Signed-off-by: Nick Piggin <npiggin@suse.de>
>> ---
>> 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
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> Thanks, added to my tree.
>
> Matt
>
FYI: I had to kill off the now unused 'survive' label. Please check
this in my tree at
http://git.kernel.org/?p=linux/kernel/git/mattst88/alpha-2.6.git;a=summary
to make sure it's correct.
Matt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-28 3:30 UTC | newest]
Thread overview: 5+ 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 01/14] alpha: invoke oom-killer from page fault npiggin
2010-04-22 20:46 ` David Rientjes
2010-04-26 20:32 ` David Rientjes
2010-04-28 2:58 ` Matt Turner
2010-04-28 3:30 ` Matt Turner
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).