Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: use watermark checks for __GFP_REPEAT high order allocations
__alloc_pages_slowpath retries costly allocations until at least order worth of pages were reclaimed or the watermark check for at least one zone would succeed after all reclaiming all pages if the reclaim hasn't made any progress. The first condition was added by a41f24e ("page allocator: smarter retry of costly-order allocations) and it assumed that lumpy reclaim could have created a page of the sufficient order. Lumpy reclaim, has been removed quite some time ago so the assumption doesn't hold anymore. It would be more appropriate to check the compaction progress instead but this patch simply removes the check and relies solely on the watermark check. To prevent from too many retries the no_progress_loops is not reseted after a reclaim which made progress because we cannot assume it helped high order situation. Only costly allocation requests depended on pages_reclaimed so we can drop it. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@suse.de> Cc: David Rientjes <rientjes@google.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
- Loading branch information