[PATCH] mm/memcontrol: split pgscan into direct and kswapd for memcg

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

 



Now we count PGSCAN_KSWAPD and PGSCAN_DIRECT into one single item
'pgscan', that's not proper.

PGSCAN_DIRECT is triggered by the tasks in this memcg, which directly
indicates the memory status of this memcg;
while PGSCAN_KSWAPD is triggered by the kswapd(which always reflects the
system level memory status) and it happens to scan the pages in this
memcg.

So we should better split 'pgscan' into 'pgscan_direct' and
'pgscan_kswapd'.

BTW, softlimit reclaim will never happen in cgroup v2.

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

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 10af4dd..abd17f8 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5635,8 +5635,8 @@ static int memory_stat_show(struct seq_file *m, void *v)
 		   acc.vmstats[WORKINGSET_NODERECLAIM]);
 
 	seq_printf(m, "pgrefill %lu\n", acc.vmevents[PGREFILL]);
-	seq_printf(m, "pgscan %lu\n", acc.vmevents[PGSCAN_KSWAPD] +
-		   acc.vmevents[PGSCAN_DIRECT]);
+	seq_printf(m, "pgscan_direct %lu\n", acc.vmevents[PGSCAN_DIRECT]);
+	seq_printf(m, "pgscan_kswapd %lu\n", acc.vmevents[PGSCAN_KSWAPD]);
 	seq_printf(m, "pgsteal %lu\n", acc.vmevents[PGSTEAL_KSWAPD] +
 		   acc.vmevents[PGSTEAL_DIRECT]);
 	seq_printf(m, "pgactivate %lu\n", acc.vmevents[PGACTIVATE]);
-- 
1.8.3.1




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

  Powered by Linux