mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers.patch removed from -mm tree
Subsystems (2)
Subject: [merged] mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 09 Jul 2013 16:19:26 -0700
The patch titled
Subject: mm: invoke oom-killer from remaining unconverted page fault handlers
has been removed from the -mm tree. Its filename was
mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Johannes Weiner <[email protected]>
Subject: mm: invoke oom-killer from remaining unconverted page fault handlers
A few remaining architectures directly kill the page faulting task in an out of memory situation. This is usually not a good idea since that task might not even use a significant amount of memory and so may not be the optimal victim to resolve the situation.
Since 2.6.29's 1c0fe6e ("mm: invoke oom-killer from page fault") there is a hook that architecture page fault handlers are supposed to call to invoke the OOM killer and let it pick the right task to kill. Convert the remaining architectures over to this hook.
To have the previous behavior of simply taking out the faulting task the vm.oom_kill_allocating_task sysctl can be set to 1.
---
arch/arc/mm/fault.c | 6 ++++-- arch/metag/mm/fault.c | 6 ++++-- arch/mn10300/mm/fault.c | 7 ++++--- arch/openrisc/mm/fault.c | 8 ++++---- arch/score/mm/fault.c | 8 ++++---- arch/tile/mm/fault.c | 8 ++++---- 6 files changed, 24 insertions(+), 19 deletions(-)
arch/arc/mm/fault.c renamed from arch/arc/mm/fault.c~mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers +4 -2
@@ -207,8 +207,10 @@ out_of_memory: }up_read (&mm->mmap_sem); -if (user_mode (regs)) -do_group_exit (SIGKILL );/* This will never return */ +if (user_mode (regs)) { +pagefault_out_of_memory (); +return ; + } goto no_context;
arch/metag/mm/fault.c renamed from arch/metag/mm/fault.c~mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers +4 -2
@@ -224,8 +224,10 @@ do_sigbus:*/ out_of_memory:up_read (&mm->mmap_sem); -if (user_mode (regs)) -do_group_exit (SIGKILL ); +if (user_mode (regs)) { +pagefault_out_of_memory (); +return 1 ; + } no_context:/* Are we prepared to handle this kernel fault? */
arch/mn10300/mm/fault.c renamed from arch/mn10300/mm/fault.c~mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers +4 -3
@@ -345,9 +345,10 @@ no_context:*/ out_of_memory:up_read (&mm->mmap_sem); -printk (KERN_ALERT "VM: killing process %s\n" , tsk->comm); -if ((fault_code & MMUFCR_xFC_ACCESS) == MMUFCR_xFC_ACCESS_USR) -do_exit (SIGKILL ); +if ((fault_code & MMUFCR_xFC_ACCESS) == MMUFCR_xFC_ACCESS_USR) { +pagefault_out_of_memory (); +return ; + } goto no_context; do_sigbus:
arch/openrisc/mm/fault.c renamed from arch/openrisc/mm/fault.c~mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers +4 -4
@@ -267,10 +267,10 @@ out_of_memory: __asm__ __volatile__("l.nop 1" );up_read (&mm->mmap_sem); -printk ("VM: killing process %s\n" , tsk->comm); -if (user_mode (regs)) -do_exit (SIGKILL ); - goto no_context; +if (!user_mode (regs)) + goto no_context; +pagefault_out_of_memory (); +return ; do_sigbus:up_read (&mm->mmap_sem);
arch/score/mm/fault.c renamed from arch/score/mm/fault.c~mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers +4 -4
@@ -172,10 +172,10 @@ out_of_memory: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);
arch/tile/mm/fault.c renamed from arch/tile/mm/fault.c~mm-invoke-oom-killer-from-remaining-unconverted-page-fault-handlers +4 -4
@@ -573,10 +573,10 @@ out_of_memory:down_read (&mm->mmap_sem); goto survive; } -pr_alert ("VM: killing process %s\n" , tsk->comm); -if (!is_kernel_mode) -do_group_exit (SIGKILL ); - goto no_context; +if (is_kernel_mode) + goto no_context; +pagefault_out_of_memory (); +return 0 ; do_sigbus:up_read (&mm->mmap_sem);
_
Patches currently in -mm which might be from [email protected] are
origin.patch swap-add-a-simple-detector-for-inappropriate-swapin-readahead-fix.patch mm-memmap_init_zone-performance-improvement.patch debugging-keep-track-of-page-owners-fix-2-fix-fix-fix.patch