[Devel] [PATCH RH9] mm/memcontrol: fill oom_kill in /proc/vmstat for containers
Andrey Zhadchenko
andrey.zhadchenko at virtuozzo.com
Mon Dec 6 18:26:27 MSK 2021
https://jira.sw.ru/browse/PSBM-130829
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 f5d59ac..ac685d7 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, vm_stats + OOM_KILL, &dummy);
+ }
#endif
}
--
1.8.3.1
More information about the Devel
mailing list