OSDN Git Service

[PATCH] oom: handle current exiting
authorNick Piggin <npiggin@suse.de>
Tue, 26 Sep 2006 06:31:29 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:48 +0000 (08:48 -0700)
commit50ec3bbffbe8a96347c54832d48110a5bc9e9ff8
tree3941902b1c68525472ea3a502e76faa7fe675cd1
parent7887a3da753e1ba8244556cc9a2b38c815bfe256
[PATCH] oom: handle current exiting

If current *is* exiting, it should actually be allowed to access reserved
memory rather than OOM kill something else.  Can't do this via a straight
check in page_alloc.c because that would allow multiple tasks to use up
reserves.  Instead cause current to OOM-kill itself which will mark it as
TIF_MEMDIE.

The current procedure of simply aborting the OOM-kill if a task is exiting can
lead to OOM deadlocks.

In the case of killing a PF_EXITING task, don't make a lot of noise about it.
This becomes more important in future patches, where we can "kill" OOM_DISABLE
tasks.

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