[Devel] [PATCH RHEL9 COMMIT] mm/memcontrol: fill oom_kill in /proc/vmstat for containers
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Dec 8 18:53:50 MSK 2021
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.34
------>
commit 573ddbe037c0ab872aa5a34d89172eef8b9c85ae
Author: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
Date: Wed Dec 8 18:53:50 2021 +0300
mm/memcontrol: fill oom_kill in /proc/vmstat for containers
https://jira.sw.ru/browse/PSBM-130829
To_merge: 4bb06a1a65c1 ("ve/memcg: Virtualize /proc/vmstat view inside CT")
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
mm/memcontrol.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index f5d59acd91b9..8b7dee74004b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -176,6 +176,8 @@ struct mem_cgroup_event {
static void mem_cgroup_threshold(struct mem_cgroup *memcg);
static void mem_cgroup_oom_notify(struct mem_cgroup *memcg);
+static void accumulate_ooms(struct mem_cgroup *memcg, unsigned long *oom,
+ unsigned long *kill);
/* Stuffs for move charges at task migration. */
/*
@@ -4200,6 +4202,12 @@ void mem_cgroup_fill_vmstat(struct mem_cgroup *memcg, unsigned long *stats)
vm_stats[PSWPOUT] = memcg_events(memcg, PSWPOUT);
vm_stats[PGFAULT] = memcg_events(memcg, PGFAULT);
vm_stats[PGMAJFAULT] = memcg_events(memcg, PGMAJFAULT);
+
+ {
+ unsigned long dummy;
+
+ accumulate_ooms(memcg, &dummy, vm_stats + OOM_KILL);
+ }
#endif
}
More information about the Devel
mailing list