path: root/mm/page_alloc.c
diff options
authorDavid Rientjes <>2009-09-21 17:01:34 -0700
committerLinus Torvalds <>2009-09-22 07:17:27 -0700
commitb259fbde0a86085264c89aa2ce9c6e35792a1aad (patch)
tree43c43fcab1fd6eb897f7348a3b2c8071d61f2b6d /mm/page_alloc.c
parent4b02108ac1b3354a22b0d83c684797692efdc395 (diff)
mm: update alloc_flags after oom killer has been called
It is possible for the oom killer to select current as the task to kill. When this happens, alloc_flags needs to be updated accordingly to set ALLOC_NO_WATERMARKS so the subsequent allocation attempt may use memory reserves as the result of its thread having TIF_MEMDIE set if the allocation is not __GFP_NOMEMALLOC. Acked-by: Mel Gorman <> Signed-off-by: David Rientjes <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/page_alloc.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e50c22545b8..b6d0d09557e 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1771,6 +1771,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
wake_all_kswapd(order, zonelist, high_zoneidx);
* OK, we're below the kswapd watermark and have kicked background
* reclaim. Now things get more complex, so set up alloc_flags according
@@ -1778,7 +1779,6 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
alloc_flags = gfp_to_alloc_flags(gfp_mask);
/* This is the last chance, in general, before the goto nopage. */
page = get_page_from_freelist(gfp_mask, nodemask, order, zonelist,
high_zoneidx, alloc_flags & ~ALLOC_NO_WATERMARKS,