]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: invoke oom-killer from remaining unconverted page fault handlers
authorJohannes Weiner <hannes@cmpxchg.org>
Wed, 19 Jun 2013 00:06:55 +0000 (10:06 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:50 +0000 (17:26 +1000)
commit6ae8980ec708b617237b679f6a8f6e0686e7998f
tree24bda20a4652cca9ad1df2a1a845d706d689fead
parenta03511d713ded78be2a07aceea4565c60148da8a
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.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com> [arch/arc bits]
Cc: James Hogan <james.hogan@imgtec.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/arc/mm/fault.c
arch/metag/mm/fault.c
arch/mn10300/mm/fault.c
arch/openrisc/mm/fault.c
arch/score/mm/fault.c
arch/tile/mm/fault.c