]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commit36136725d0e89003f87fbb612aa5001f25bd7835
tree39f687cc0470cea45ed1387ebc16fee7d6066485
parent54f4d41ac001135a6834463285381556c472b388
[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