diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 61290ea721c8..5b09488d0f55 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -178,6 +178,8 @@ static void set_pageblock_migratetype(struct page *page, int migratetype) | |||
178 | PB_migrate, PB_migrate_end); | 178 | PB_migrate, PB_migrate_end); |
179 | } | 179 | } |
180 | 180 | ||
181 | bool oom_killer_disabled __read_mostly; | ||
182 | |||
181 | #ifdef CONFIG_DEBUG_VM | 183 | #ifdef CONFIG_DEBUG_VM |
182 | static int page_outside_zone_boundaries(struct zone *zone, struct page *page) | 184 | static int page_outside_zone_boundaries(struct zone *zone, struct page *page) |
183 | { | 185 | { |
@@ -1769,6 +1771,8 @@ rebalance: | |||
1769 | */ | 1771 | */ |
1770 | if (!did_some_progress) { | 1772 | if (!did_some_progress) { |
1771 | if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) { | 1773 | if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) { |
1774 | if (oom_killer_disabled) | ||
1775 | goto nopage; | ||
1772 | page = __alloc_pages_may_oom(gfp_mask, order, | 1776 | page = __alloc_pages_may_oom(gfp_mask, order, |
1773 | zonelist, high_zoneidx, | 1777 | zonelist, high_zoneidx, |
1774 | nodemask, preferred_zone, | 1778 | nodemask, preferred_zone, |