diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a47f0b229a1a..40e29429e7b0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2353,8 +2353,15 @@ __alloc_pages_may_oom(gfp_t gfp_mask, unsigned int order, | |||
2353 | if (ac->high_zoneidx < ZONE_NORMAL) | 2353 | if (ac->high_zoneidx < ZONE_NORMAL) |
2354 | goto out; | 2354 | goto out; |
2355 | /* The OOM killer does not compensate for light reclaim */ | 2355 | /* The OOM killer does not compensate for light reclaim */ |
2356 | if (!(gfp_mask & __GFP_FS)) | 2356 | if (!(gfp_mask & __GFP_FS)) { |
2357 | /* | ||
2358 | * XXX: Page reclaim didn't yield anything, | ||
2359 | * and the OOM killer can't be invoked, but | ||
2360 | * keep looping as per should_alloc_retry(). | ||
2361 | */ | ||
2362 | *did_some_progress = 1; | ||
2357 | goto out; | 2363 | goto out; |
2364 | } | ||
2358 | /* | 2365 | /* |
2359 | * GFP_THISNODE contains __GFP_NORETRY and we never hit this. | 2366 | * GFP_THISNODE contains __GFP_NORETRY and we never hit this. |
2360 | * Sanity check for bare calls of __GFP_THISNODE, not real OOM. | 2367 | * Sanity check for bare calls of __GFP_THISNODE, not real OOM. |
@@ -2366,7 +2373,8 @@ __alloc_pages_may_oom(gfp_t gfp_mask, unsigned int order, | |||
2366 | goto out; | 2373 | goto out; |
2367 | } | 2374 | } |
2368 | /* Exhausted what can be done so it's blamo time */ | 2375 | /* Exhausted what can be done so it's blamo time */ |
2369 | if (out_of_memory(ac->zonelist, gfp_mask, order, ac->nodemask, false)) | 2376 | if (out_of_memory(ac->zonelist, gfp_mask, order, ac->nodemask, false) |
2377 | || WARN_ON_ONCE(gfp_mask & __GFP_NOFAIL)) | ||
2370 | *did_some_progress = 1; | 2378 | *did_some_progress = 1; |
2371 | out: | 2379 | out: |
2372 | oom_zonelist_unlock(ac->zonelist, gfp_mask); | 2380 | oom_zonelist_unlock(ac->zonelist, gfp_mask); |