Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: memcg: future proof hierarchical statistics documentation

The hierarchical versions of per-memcg counters in memory.stat are all
calculated the same way and are all named total_<counter>.

Documenting the pattern is easier for maintenance than listing each
counter twice.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Ying Han <yinghan@google.com>
Randy Dunlap <rdunlap@xenotime.net>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Johannes Weiner and committed by
Linus Torvalds
eb6332a5 6f60b69d

+4 -11
+4 -11
Documentation/cgroups/memory.txt
··· 430 430 hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to 431 431 hierarchy under which memory cgroup is. 432 432 433 - total_cache - sum of all children's "cache" 434 - total_rss - sum of all children's "rss" 435 - total_mapped_file - sum of all children's "cache" 436 - total_pgpgin - sum of all children's "pgpgin" 437 - total_pgpgout - sum of all children's "pgpgout" 438 - total_swap - sum of all children's "swap" 439 - total_inactive_anon - sum of all children's "inactive_anon" 440 - total_active_anon - sum of all children's "active_anon" 441 - total_inactive_file - sum of all children's "inactive_file" 442 - total_active_file - sum of all children's "active_file" 443 - total_unevictable - sum of all children's "unevictable" 433 + total_<counter> - # hierarchical version of <counter>, which in 434 + addition to the cgroup's own value includes the 435 + sum of all hierarchical children's values of 436 + <counter>, i.e. total_cache 444 437 445 438 # The following additional stats are dependent on CONFIG_DEBUG_VM. 446 439