Skip to contentSkip to conversation

memcg: add documentation for memory.numastat API.

PATCH In review Ying Han 4 participants 4 messages May 24, 2011

Subsystems (2)
lore
Share & tools
lore

Ying Han

author
#0 lore raw

PATCH v2 1/1 memcg: add documentation for memory.numastat API.

change v2..v1:
1. add sample output.

---
 Documentation/cgroups/memory.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
Documentation/cgroups/memory.txt +18 -0
index 2d7e527..0b1a1ce 100644
@@ -71,6 +71,7 @@ Brief summary of control files.
  memory.move_charge_at_immigrate # set/show controls of moving charges
  memory.oom_control		 # set/show oom controls.
  memory.async_control		 # set control for asynchronous memory reclaim
+ memory.numa_stat		 # show the number of memory usage per numa node
 
 1. History
 
@@ -477,6 +478,23 @@ value for efficient access. (Of course, when necessary, it's synchronized.)
 If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
 value in memory.stat(see 5.2).
 
+5.6 numa_stat
+
+This is similar to numa_maps but per-memcg basis. This is useful to add visibility
+of numa locality information in memcg since the pages are allowed to be allocated
+at any physical node. One of the usecase is evaluating application performance by
+combining this information with the cpu allocation to the application.
+
+We export "total", "file", "anon" and "unevictable" pages per-node for each memcg.
+The format ouput of the memory.numa_stat:
+
+total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
+file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
+anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
+unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
+
+And we have total = file + anon + unevictable.
+
 6. Hierarchy support
 
 The memory controller supports a deep hierarchy and hierarchical accounting.
Signature · 8 lines
1.7.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by on v2 1/1
#1 lore raw
Quoted 31 lines · Ying Han

change v2..v1:
1. add sample output.

---
 Documentation/cgroups/memory.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
Documentation/cgroups/memory.txt +8 -0
index 2d7e527..0b1a1ce 100644
@@ -71,6 +71,7 @@ Brief summary of control files.
  memory.move_charge_at_immigrate # set/show controls of moving charges
  memory.oom_control		 # set/show oom controls.
  memory.async_control		 # set control for asynchronous memory reclaim
+ memory.numa_stat		 # show the number of memory usage per numa node
 
 1. History
 
@@ -477,6 +478,23 @@ value for efficient access. (Of course, when necessary, it's synchronized.)
 If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
 value in memory.stat(see 5.2).
 
+5.6 numa_stat
+
+This is similar to numa_maps but per-memcg basis. This is useful to add visibility
+of numa locality information in memcg since the pages are allowed to be allocated
+at any physical node. One of the usecase is evaluating application performance by
+combining this information with the cpu allocation to the application.
+

Documentation/cgroups/memory.txt value for efficient access. (Of course, when necessary, it's synchronized.) · line 497

Quoted 10 lines
Documentation/cgroups/memory.txt +10 -0
+We export "total", "file", "anon" and "unevictable" pages per-node for each memcg.
+The format ouput of the memory.numa_stat:
+
+total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
+file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
+anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
+unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
+
+And we have total = file + anon + unevictable.
+

Looks good to me.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Acked-by on v2 1/1
#2 lore raw
In reply to Ying Han
Quoted 31 lines · Ying Han

change v2..v1:
1. add sample output.

---
 Documentation/cgroups/memory.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
Documentation/cgroups/memory.txt +8 -0
index 2d7e527..0b1a1ce 100644
@@ -71,6 +71,7 @@ Brief summary of control files.
  memory.move_charge_at_immigrate # set/show controls of moving charges
  memory.oom_control		 # set/show oom controls.
  memory.async_control		 # set control for asynchronous memory reclaim
+ memory.numa_stat		 # show the number of memory usage per numa node
 
 1. History
 
@@ -477,6 +478,23 @@ value for efficient access. (Of course, when necessary, it's synchronized.)
 If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
 value in memory.stat(see 5.2).
 
+5.6 numa_stat
+
+This is similar to numa_maps but per-memcg basis. This is useful to add visibility
+of numa locality information in memcg since the pages are allowed to be allocated
+at any physical node. One of the usecase is evaluating application performance by
+combining this information with the cpu allocation to the application.
+

Documentation/cgroups/memory.txt value for efficient access. (Of course, when necessary, it's synchronized.) · line 497

Quoted 10 lines
Documentation/cgroups/memory.txt +10 -0
+We export "total", "file", "anon" and "unevictable" pages per-node for each memcg.
+The format ouput of the memory.numa_stat:
+
+total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
+file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
+anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
+unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
+
+And we have total = file + anon + unevictable.
+

Looks good

Signature · 9 lines
	Three Cheers,
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Acked-by on v2 1/1
#3 lore raw
In reply to Ying Han
Quoted 33 lines · On Tue, 24 May 2011 00:01:53 -0700 Ying Han <[email protected]> wrote:

change v2..v1:
1. add sample output.

---
 Documentation/cgroups/memory.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
Documentation/cgroups/memory.txt +10 -0
index 2d7e527..0b1a1ce 100644
@@ -71,6 +71,7 @@ Brief summary of control files.
  memory.move_charge_at_immigrate # set/show controls of moving charges
  memory.oom_control		 # set/show oom controls.
  memory.async_control		 # set control for asynchronous memory reclaim
+ memory.numa_stat		 # show the number of memory usage per numa node
 
 1. History
 
@@ -477,6 +478,23 @@ value for efficient access. (Of course, when necessary, it's synchronized.)
 If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
 value in memory.stat(see 5.2).
 
+5.6 numa_stat
+
+This is similar to numa_maps but per-memcg basis. This is useful to add visibility
+of numa locality information in memcg since the pages are allowed to be allocated
+at any physical node. One of the usecase is evaluating application performance by
+combining this information with the cpu allocation to the application.
+
+We export "total", "file", "anon" and "unevictable" pages per-node for each memcg.
+The format ouput of the memory.numa_stat:

Documentation/cgroups/memory.txt value for efficient access. (Of course, when necessary, it's synchronized.) · line 499

Quoted 10 lines
Documentation/cgroups/memory.txt +8 -0
+
+total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
+file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
+anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
+unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
+
+And we have total = file + anon + unevictable.
+
 6. Hierarchy support
 

Thank you.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>