diff --git a/include/linux/vmpressure.h b/include/linux/vmpressure.h index b2fbfffe4808..6503dafb8e7c 100755 --- a/include/linux/vmpressure.h +++ b/include/linux/vmpressure.h @@ -36,7 +36,8 @@ extern int vmpressure_notifier_unregister(struct notifier_block *nb); extern void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree, unsigned long scanned, unsigned long reclaimed, int order); -extern void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio); +extern void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio, + int order); #ifdef CONFIG_MEMCG extern void vmpressure_init(struct vmpressure *vmpr); diff --git a/mm/vmpressure.c b/mm/vmpressure.c index 42e53afaf893..df96c5b561ea 100755 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c @@ -437,8 +437,11 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree, * * This function does not return any value. */ -void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio) +void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio, int order) { + if (order > PAGE_ALLOC_COSTLY_ORDER) + return; + /* * We only use prio for accounting critical level. For more info * see comment for vmpressure_level_critical_prio variable above. diff --git a/mm/vmscan.c b/mm/vmscan.c index 068285f41938..ff57d5367a7c 100755 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3141,7 +3141,7 @@ retry: do { vmpressure_prio(sc->gfp_mask, sc->target_mem_cgroup, - sc->priority); + sc->priority, sc->order); sc->nr_scanned = 0; shrink_zones(zonelist, sc);