linux/arch
Johannes Weiner 94bce453c7 arch: mm: remove obsolete init OOM protection
The memcg code can trap tasks in the context of the failing allocation
until an OOM situation is resolved.  They can hold all kinds of locks
(fs, mm) at this point, which makes it prone to deadlocking.

This series converts memcg OOM handling into a two step process that is
started in the charge context, but any waiting is done after the fault
stack is fully unwound.

Patches 1-4 prepare architecture handlers to support the new memcg
requirements, but in doing so they also remove old cruft and unify
out-of-memory behavior across architectures.

Patch 5 disables the memcg OOM handling for syscalls, readahead, kernel
faults, because they can gracefully unwind the stack with -ENOMEM.  OOM
handling is restricted to user triggered faults that have no other
option.

Patch 6 reworks memcg's hierarchical OOM locking to make it a little
more obvious wth is going on in there: reduce locked regions, rename
locking functions, reorder and document.

Patch 7 implements the two-part OOM handling such that tasks are never
trapped with the full charge stack in an OOM situation.

This patch:

Back before smart OOM killing, when faulting tasks were killed directly on
allocation failures, the arch-specific fault handlers needed special
protection for the init process.

Now that all fault handlers call into the generic OOM killer (see commit
609838cfed: "mm: invoke oom-killer from remaining unconverted page
fault handlers"), which already provides init protection, the
arch-specific leftovers can be removed.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: azurIt <azurit@pobox.sk>
Acked-by: Vineet Gupta <vgupta@synopsys.com>	[arch/arc bits]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-09-12 15:38:01 -07:00
..
alpha kernel-wide: fix missing validations on __get/__put/__copy_to/__copy_from_user() 2013-09-11 15:58:18 -07:00
arc arch: mm: remove obsolete init OOM protection 2013-09-12 15:38:01 -07:00
arm mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
arm64 mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
avr32 - factor out common code from MTD tests 2013-09-09 10:33:19 -07:00
blackfin Merge branch 'cpuinit_phase2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2013-07-18 10:50:26 -07:00
c6x of: consolidate definition of early_init_dt_alloc_memory_arch() 2013-08-28 21:18:32 +01:00
cris CRIS: drop unused Kconfig symbols 2013-09-10 17:38:07 +02:00
frv frv/PCI: Mark pcibios_fixup_bus() as non-init 2013-07-25 12:18:42 -06:00
h8300 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
hexagon arch: *: Kconfig: add "kernel/Kconfig.freezer" to "arch/*/Kconfig" 2013-08-13 17:57:49 -07:00
ia64 mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
m32r m32r: delete __cpuinit usage from all m32r files 2013-07-14 19:36:55 -04:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2013-09-09 09:04:46 -07:00
metag mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
microblaze Device tree core updates for v3.12 2013-09-10 13:53:52 -07:00
mips mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
mn10300 mn10300: Fix crash just after starting userspace on !CONFIG_PREEMPT 2013-09-10 14:54:59 -07:00
openrisc Device tree core updates for v3.12 2013-09-10 13:53:52 -07:00
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-09-06 09:36:28 -07:00
powerpc mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
s390 s390/vmcore: use vmcore for zfcpdump 2013-09-11 15:59:15 -07:00
score arch: mm: remove obsolete init OOM protection 2013-09-12 15:38:01 -07:00
sh mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
sparc kernel-wide: fix missing validations on __get/__put/__copy_to/__copy_from_user() 2013-09-11 15:58:18 -07:00
tile arch: mm: remove obsolete init OOM protection 2013-09-12 15:38:01 -07:00
um um: Add irq chip um/mask handlers 2013-09-07 10:57:19 +02:00
unicore32 reboot: move arch/x86 reboot= handling to generic kernel 2013-07-09 10:33:29 -07:00
x86 mm: make sure _PAGE_SWP_SOFT_DIRTY bit is not set on present pte 2013-09-11 15:58:06 -07:00
xtensa of: Specify initrd location using 64-bit 2013-07-24 11:10:01 +01:00
.gitignore
Kconfig microblaze: fix clone syscall 2013-08-13 17:57:48 -07:00