Loading mm/page_alloc.c +10 −5 Original line number Diff line number Diff line Loading @@ -2059,7 +2059,7 @@ static void reserve_highatomic_pageblock(struct page *page, struct zone *zone, * intense memory pressure but failed atomic allocations should be easier * to recover from than an OOM. */ static void unreserve_highatomic_pageblock(const struct alloc_context *ac) static bool unreserve_highatomic_pageblock(const struct alloc_context *ac) { struct zonelist *zonelist = ac->zonelist; unsigned long flags; Loading @@ -2067,6 +2067,7 @@ static void unreserve_highatomic_pageblock(const struct alloc_context *ac) struct zone *zone; struct page *page; int order; bool ret; for_each_zone_zonelist_nodemask(zone, z, zonelist, ac->high_zoneidx, ac->nodemask) { Loading Loading @@ -2115,12 +2116,14 @@ static void unreserve_highatomic_pageblock(const struct alloc_context *ac) * may increase. */ set_pageblock_migratetype(page, ac->migratetype); move_freepages_block(zone, page, ac->migratetype); ret = move_freepages_block(zone, page, ac->migratetype); spin_unlock_irqrestore(&zone->lock, flags); return; return ret; } spin_unlock_irqrestore(&zone->lock, flags); } return false; } /* Remove an element from the buddy allocator from the fallback list */ Loading Loading @@ -3444,8 +3447,10 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, * Make sure we converge to OOM if we cannot make any progress * several times in the row. */ if (*no_progress_loops > MAX_RECLAIM_RETRIES) return false; if (*no_progress_loops > MAX_RECLAIM_RETRIES) { /* Before OOM, exhaust highatomic_reserve */ return unreserve_highatomic_pageblock(ac); } /* * Keep reclaiming pages while there is a chance this will lead Loading Loading
mm/page_alloc.c +10 −5 Original line number Diff line number Diff line Loading @@ -2059,7 +2059,7 @@ static void reserve_highatomic_pageblock(struct page *page, struct zone *zone, * intense memory pressure but failed atomic allocations should be easier * to recover from than an OOM. */ static void unreserve_highatomic_pageblock(const struct alloc_context *ac) static bool unreserve_highatomic_pageblock(const struct alloc_context *ac) { struct zonelist *zonelist = ac->zonelist; unsigned long flags; Loading @@ -2067,6 +2067,7 @@ static void unreserve_highatomic_pageblock(const struct alloc_context *ac) struct zone *zone; struct page *page; int order; bool ret; for_each_zone_zonelist_nodemask(zone, z, zonelist, ac->high_zoneidx, ac->nodemask) { Loading Loading @@ -2115,12 +2116,14 @@ static void unreserve_highatomic_pageblock(const struct alloc_context *ac) * may increase. */ set_pageblock_migratetype(page, ac->migratetype); move_freepages_block(zone, page, ac->migratetype); ret = move_freepages_block(zone, page, ac->migratetype); spin_unlock_irqrestore(&zone->lock, flags); return; return ret; } spin_unlock_irqrestore(&zone->lock, flags); } return false; } /* Remove an element from the buddy allocator from the fallback list */ Loading Loading @@ -3444,8 +3447,10 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, * Make sure we converge to OOM if we cannot make any progress * several times in the row. */ if (*no_progress_loops > MAX_RECLAIM_RETRIES) return false; if (*no_progress_loops > MAX_RECLAIM_RETRIES) { /* Before OOM, exhaust highatomic_reserve */ return unreserve_highatomic_pageblock(ac); } /* * Keep reclaiming pages while there is a chance this will lead Loading