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 <sultan@kerneltoast.com>
fourteen
Sultan Alsawaf 5 years ago committed by Jenna
parent a806cc4251
commit 0bdf42f8f9
  1. 5
      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);
}

Loading…
Cancel
Save