The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxcfs/pull/337
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Irnes Mujkanovic <irnes.mujkano...@gmail.com>
From 91d63a9e1a1ce55a69ad8af78071ca8f0a67738a Mon Sep 17 00:00:00 2001 From: Irnes Mujkanovic <ir...@bicomsystems.com> Date: Tue, 3 Mar 2020 10:44:42 +0100 Subject: [PATCH] meminfo: fix used/cache memory calculation under cgroup2 Signed-off-by: Irnes Mujkanovic <irnes.mujkano...@gmail.com> --- proc_fuse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proc_fuse.c b/proc_fuse.c index afe11a2..1cbf54d 100644 --- a/proc_fuse.c +++ b/proc_fuse.c @@ -984,8 +984,8 @@ static bool cgroup_parse_memory_stat(const char *cgroup, struct memory_stat *mst sscanf(line, "hierarchical_memory_limit %" PRIu64, &(mstat->hierarchical_memory_limit)); } else if (!unified && startswith(line, "hierarchical_memsw_limit")) { sscanf(line, "hierarchical_memsw_limit %" PRIu64, &(mstat->hierarchical_memsw_limit)); - } else if (!unified && startswith(line, "total_cache")) { - sscanf(line, "total_cache %" PRIu64, &(mstat->total_cache)); + } else if (startswith(line, unified ? "file" :"total_cache")) { + sscanf(line, unified ? "file %" PRIu64 : "total_cache %" PRIu64, &(mstat->total_cache)); } else if (!unified && startswith(line, "total_rss")) { sscanf(line, "total_rss %" PRIu64, &(mstat->total_rss)); } else if (!unified && startswith(line, "total_rss_huge")) {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel