mm: avoid endless looping for oom killed tasks
authorDavid Rientjes <rientjes@google.com>
Wed, 29 Jul 2009 22:02:06 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Jul 2009 02:10:34 +0000 (19:10 -0700)
commit6583bb64fc370842b32a87c67750c26f6d559af0
tree321681ebc6ff893318d67859b24f199b9111cbc8
parente084b2d95e48b31aa45f9c49ffc6cdae8bdb21d4
mm: avoid endless looping for oom killed tasks

If a task is oom killed and still cannot find memory when trying with
no watermarks, it's better to fail the allocation attempt than to loop
endlessly.  Direct reclaim has already failed and the oom killer will
be a no-op since current has yet to die, so there is no other
alternative for allocations that are not __GFP_NOFAIL.

Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c