Skip to content

Commit 50c35e5

Browse files
yinghantorvalds
authored andcommitted
memcg: add documentation for the memory.numastat API
[akpm@linux-foundation.org: rework text, fit it into 80-cols] Signed-off-by: Ying Han <yinghan@google.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: Balbir Singh <bsingharora@gmail.com> 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>
1 parent d7911ef commit 50c35e5

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎Documentation/cgroups/memory.txt‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Brief summary of control files.
7070
(See sysctl's vm.swappiness)
7171
memory.move_charge_at_immigrate # set/show controls of moving charges
7272
memory.oom_control # set/show oom controls.
73+
memory.numa_stat # show the number of memory usage per numa node
7374

7475
1. History
7576

@@ -464,6 +465,24 @@ value for efficient access. (Of course, when necessary, it's synchronized.)
464465
If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
465466
value in memory.stat(see 5.2).
466467

468+
5.6 numa_stat
469+
470+
This is similar to numa_maps but operates on a per-memcg basis. This is
471+
useful for providing visibility into the numa locality information within
472+
an memcg since the pages are allowed to be allocated from any physical
473+
node. One of the usecases is evaluating application performance by
474+
combining this information with the application's cpu allocation.
475+
476+
We export "total", "file", "anon" and "unevictable" pages per-node for
477+
each memcg. The ouput format of memory.numa_stat is:
478+
479+
total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
480+
file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
481+
anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
482+
unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
483+
484+
And we have total = file + anon + unevictable.
485+
467486
6. Hierarchy support
468487

469488
The memory controller supports a deep hierarchy and hierarchical accounting.

0 commit comments

Comments
 (0)