]> git.proxmox.com Git - mirror_lxcfs.git/commit
Fix inaccurate values in /proc/meminfo for containers with child cgroups
authorAaron Sokoloski <asokoloski@gmail.com>
Sat, 2 Dec 2017 18:43:06 +0000 (12:43 -0600)
committerAaron Sokoloski <asokoloski@gmail.com>
Sat, 2 Dec 2017 18:43:06 +0000 (12:43 -0600)
commit4accebfb81919ea3d9566ee647cffc18b5bc03e6
tree9bbaaaf15b1d5eaf4fc33339e455318304ee6e29
parent8ccf5651006d1123fc33d1cb752763e3672837ed
Fix inaccurate values in /proc/meminfo for containers with child cgroups

The values for Cached, Active, Inactive, Active(anon), Inactive(anon),
Active(file), Inactive(file), and Unevictable are derived/computed
from these values in the relevant meminfo.stat:

cache
active_anon
inactive_anon
active_file
inactive_file
unevictable

However, these value apply only to the cgroup of the lxc container
itself.  If your container uses memory cgroups internally, and thus
the container cgroup has children, their memory is not counted.

In order to take the memory usage of child cgroups into account, we
need to look at the "total_" prefixed versions of these values.

Signed-off-by: Aaron Sokoloski <asokoloski@gmail.com>
bindings.c