From 0bdf42f8f9b5c5791f5ceda2a121e17409498ac4 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Sat, 4 Apr 2020 17:48:40 -0700 Subject: [PATCH] mm: vmpressure: Ignore allocation orders above PAGE_ALLOC_COSTLY_ORDER PAGE_ALLOC_COSTLY_ORDER allocations can cause vmpressure to incorrectly think that memory pressure is high, when it's really just that the allocation's high order is difficult to satisfy. When this rare scenario occurs, ignore the input to vmpressure to avoid sending out a spurious high-pressure signal. Signed-off-by: Sultan Alsawaf --- mm/vmpressure.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/vmpressure.c b/mm/vmpressure.c index 41feba964d5b..58b72c0322af 100755 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c @@ -422,8 +422,11 @@ static void __vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool critical, * This function does not return any value. */ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree, - unsigned long scanned, unsigned long reclaimed) + unsigned long scanned, unsigned long reclaimed, int order) { + if (order > PAGE_ALLOC_COSTLY_ORDER) + return; + __vmpressure(gfp, memcg, false, tree, scanned, reclaimed); }