[PATCH] mm/vmscan: call vmpressure_prio() in kswapd reclaim path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Once the reclaim scanning depth goes too deep, it always mean we are
under memory pressure now.
This behavior should be captured by vmpressure_prio(), which should run
every time when the vmscan's reclaiming priority (scanning depth)
changes.
It's possible the scanning depth goes deep in kswapd reclaim path,
so vmpressure_prio() should be called in this path.

Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx>
---
 mm/vmscan.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index b79f584..1fbd3be 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3609,8 +3609,11 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
 		if (nr_boost_reclaim && !nr_reclaimed)
 			break;
 
-		if (raise_priority || !nr_reclaimed)
+		if (raise_priority || !nr_reclaimed) {
+			vmpressure_prio(sc.gfp_mask, sc.target_mem_cgroup,
+					sc.priority);
 			sc.priority--;
+		}
 	} while (sc.priority >= 1);
 
 	if (!sc.nr_reclaimed)
-- 
1.8.3.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux