Re: [patch 01/14] alpha: invoke oom-killer from page fault

Matt Turner
2010-04-28T02:58:29Z

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