[Devel] [PATCH RHEL8 COMMIT] 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 20:58:04 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-305.3.1.vz8.7.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-305.3.1.vz8.7.7
------>
commit 776c3da7440214fc61bf1ea6ec673b5a6a9e06de
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Wed Aug 18 13:48:01 2021 +0300
ve/memcg: Honor changing per-memcg s[un]reclaimable counters to bytes in per-CT /proc/vmstat
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);
More information about the Devel
mailing list