[Devel] [PATCH vz8 4/5] ve/memcg: Honor changing per-memcg s[un]reclaimable counters to bytes in per-CT /proc/vmstat
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Aug 18 14:29:28 MSK 2021
RHEL8.4 has following ms commit backported:
d42f3245c7e2 ("mm: memcg: convert vmstat slab counters to bytes")
So, update places were we use per-memcg counters NR_SLAB_[UN]RECLAIMABLE_B
accordingly.
https://jira.sw.ru/browse/PSBM-132893
Fixes: 3e93dd148348 ("ve/memcg: Fix /proc/vmstat virtualization (drop
extra recursion)")
To_merge: 5f48326db336 ("ve/memcg: Virtualize /proc/vmstat view inside CT")
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
mm/memcontrol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 8b46f47660d8..b5cdbb7818c8 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4302,9 +4302,9 @@ void mem_cgroup_fill_vmstat(struct mem_cgroup *memcg, unsigned long *stats)
node_stats[NR_INACTIVE_FILE];
node_stats[NR_SLAB_RECLAIMABLE_B] =
- memcg_page_state(memcg, NR_SLAB_RECLAIMABLE_B);
+ memcg_page_state(memcg, NR_SLAB_RECLAIMABLE_B) >> PAGE_SHIFT;
node_stats[NR_SLAB_UNRECLAIMABLE_B] =
- memcg_page_state(memcg, NR_SLAB_UNRECLAIMABLE_B);
+ memcg_page_state(memcg, NR_SLAB_UNRECLAIMABLE_B) >> PAGE_SHIFT;
node_stats[NR_FILE_MAPPED] = memcg_page_state(memcg, NR_FILE_MAPPED);
node_stats[NR_SHMEM] = memcg_page_state(memcg, NR_SHMEM);
--
2.28.0
More information about the Devel
mailing list