UPSTREAM mm: memcg: enable memcg OOM killer only for user faults
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 8 Aug 2013 02:56:32 +0000 (12:56 +1000)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:44:02 +0000 (13:44 -0700)
commitc5ffca3f2332a408e9d216925d5d732ed67abcc7
treead7a1d7049ea416bae349349b3f88be8278d033c
parentaf141cc49eb867c7f885052b29006de44c6d19e9
UPSTREAM mm: memcg: enable memcg OOM killer only for user faults

System calls and kernel faults (uaccess, gup) can handle an out of memory
situation gracefully and just return -ENOMEM.

Enable the memcg OOM killer only for user faults, where it's really the
only option available.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: azurIt <azurit@pobox.sk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 31d1d8b2aa8733b4fe221b4bcbaa15aec3582b99)
Change-Id: If84752f6c46e464bc0d1d868ac543497425ba7cc
Reviewed-on: http://git-master/r/266405
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
include/linux/memcontrol.h
include/linux/sched.h
mm/filemap.c
mm/memcontrol.c
mm/memory.c