On Thu, May 07, 2020 at 01:49:13PM -0700, Shakeel Butt wrote: > One way to measure the efficiency of memory reclaim is to look at the > ratio (pgscan+pfrefill)/pgsteal. However at the moment these stats are > not updated consistently at the system level and the ratio of these are > not very meaningful. The pgsteal and pgscan are updated for only global > reclaim while pgrefill gets updated for global as well as cgroup > reclaim. > > Please note that this difference is only for system level vmstats. The > cgroup stats returned by memory.stat are actually consistent. The > cgroup's pgsteal contains number of reclaimed pages for global as well > as cgroup reclaim. So, one way to get the system level stats is to get > these stats from root's memory.stat but root does not expose that > interface. Also for !CONFIG_MEMCG machines /proc/vmstat is the only way > to get these stats. So, make these stats consistent. > > Signed-off-by: Shakeel Butt <shakeelb@xxxxxxxxxx> Acked-by: Roman Gushchin <guro@xxxxxx> Thanks!