[PATCH] oom: handle oom_disable exiting
authorNick Piggin <npiggin@suse.de>
Tue, 26 Sep 2006 06:31:30 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:48 +0000 (08:48 -0700)
commit4a3ede107e422a0c53d28024b0aa902ca22a8768
tree39f687cc0470cea45ed1387ebc16fee7d6066485
parent50ec3bbffbe8a96347c54832d48110a5bc9e9ff8
[PATCH] oom: handle oom_disable exiting

Having the oomkilladj == OOM_DISABLE check before the releasing check means
that oomkilladj == OOM_DISABLE tasks exiting will not stop the OOM killer.

Moving the test down will give the desired behaviour.  Also: it will allow
them to "OOM-kill" themselves if they are exiting.  As per the previous patch,
this is required to prevent OOM killer deadlocks (and they don't actually get
killed, because they're already exiting -- they're simply allowed access to
memory reserves).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/oom_kill.c