]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, memcg: avoid oom notification when current needs access to memory reserves
authorDavid Rientjes <rientjes@google.com>
Mon, 16 Dec 2013 23:45:02 +0000 (10:45 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 16 Dec 2013 23:45:02 +0000 (10:45 +1100)
commit20c8315b33bba95a10447483221df17c3b1dcd20
tree7505e8be6c4240aca00376abe86a843c0818991f
parentd93cde672ed1ac3a689f241be61824f8633abf7d
mm, memcg: avoid oom notification when current needs access to memory reserves

When current has a pending SIGKILL or is already in the exit path, it only
needs access to memory reserves to fully exit.  In that sense, the memcg
is not actually oom for current, it simply needs to bypass memory charges
to exit and free its memory, which is guarantee itself that memory will be
freed.

We only want to notify userspace for actionable oom conditions where
something needs to be done (and all oom handling can already be deferred
to userspace through this method by disabling the memcg oom killer with
memory.oom_control), not simply when a memcg has reached its limit, which
would actually have to happen before memcg reclaim actually frees memory
for charges.

Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c