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> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- include/linux/memcontrol.h 44 additions, 0 deletionsinclude/linux/memcontrol.h
- include/linux/sched.h 3 additions, 0 deletionsinclude/linux/sched.h
- mm/filemap.c 10 additions, 1 deletionmm/filemap.c
- mm/memcontrol.c 1 addition, 1 deletionmm/memcontrol.c
- mm/memory.c 30 additions, 10 deletionsmm/memory.c
Loading
Please register or sign in to comment