aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/controllers/memory.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/controllers/memory.txt')
-rw-r--r--Documentation/controllers/memory.txt24
1 files changed, 9 insertions, 15 deletions
diff --git a/Documentation/controllers/memory.txt b/Documentation/controllers/memory.txt
index b5bbea92a61a..6015347b41e2 100644
--- a/Documentation/controllers/memory.txt
+++ b/Documentation/controllers/memory.txt
@@ -170,14 +170,14 @@ NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
170mega or gigabytes. 170mega or gigabytes.
171 171
172# cat /cgroups/0/memory.limit_in_bytes 172# cat /cgroups/0/memory.limit_in_bytes
1734194304 Bytes 1734194304
174 174
175NOTE: The interface has now changed to display the usage in bytes 175NOTE: The interface has now changed to display the usage in bytes
176instead of pages 176instead of pages
177 177
178We can check the usage: 178We can check the usage:
179# cat /cgroups/0/memory.usage_in_bytes 179# cat /cgroups/0/memory.usage_in_bytes
1801216512 Bytes 1801216512
181 181
182A successful write to this file does not guarantee a successful set of 182A successful write to this file does not guarantee a successful set of
183this limit to the value written into the file. This can be due to a 183this limit to the value written into the file. This can be due to a
@@ -187,7 +187,7 @@ this file after a write to guarantee the value committed by the kernel.
187 187
188# echo -n 1 > memory.limit_in_bytes 188# echo -n 1 > memory.limit_in_bytes
189# cat memory.limit_in_bytes 189# cat memory.limit_in_bytes
1904096 Bytes 1904096
191 191
192The memory.failcnt field gives the number of times that the cgroup limit was 192The memory.failcnt field gives the number of times that the cgroup limit was
193exceeded. 193exceeded.
@@ -233,13 +233,6 @@ cgroup might have some charge associated with it, even though all
233tasks have migrated away from it. Such charges are automatically dropped at 233tasks have migrated away from it. Such charges are automatically dropped at
234rmdir() if there are no tasks. 234rmdir() if there are no tasks.
235 235
2364.4 Choosing what to account -- Page Cache (unmapped) vs RSS (mapped)?
237
238The type of memory accounted by the cgroup can be limited to just
239mapped pages by writing "1" to memory.control_type field
240
241echo -n 1 > memory.control_type
242
2435. TODO 2365. TODO
244 237
2451. Add support for accounting huge pages (as a separate controller) 2381. Add support for accounting huge pages (as a separate controller)
@@ -262,18 +255,19 @@ References
2623. Emelianov, Pavel. Resource controllers based on process cgroups 2553. Emelianov, Pavel. Resource controllers based on process cgroups
263 http://lkml.org/lkml/2007/3/6/198 256 http://lkml.org/lkml/2007/3/6/198
2644. Emelianov, Pavel. RSS controller based on process cgroups (v2) 2574. Emelianov, Pavel. RSS controller based on process cgroups (v2)
265 http://lkml.org/lkml/2007/4/9/74 258 http://lkml.org/lkml/2007/4/9/78
2665. Emelianov, Pavel. RSS controller based on process cgroups (v3) 2595. Emelianov, Pavel. RSS controller based on process cgroups (v3)
267 http://lkml.org/lkml/2007/5/30/244 260 http://lkml.org/lkml/2007/5/30/244
2686. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/ 2616. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/
2697. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and control 2627. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and control
270 subsystem (v3), http://lwn.net/Articles/235534/ 263 subsystem (v3), http://lwn.net/Articles/235534/
2718. Singh, Balbir. RSS controller V2 test results (lmbench), 2648. Singh, Balbir. RSS controller v2 test results (lmbench),
272 http://lkml.org/lkml/2007/5/17/232 265 http://lkml.org/lkml/2007/5/17/232
2739. Singh, Balbir. RSS controller V2 AIM9 results 2669. Singh, Balbir. RSS controller v2 AIM9 results
274 http://lkml.org/lkml/2007/5/18/1 267 http://lkml.org/lkml/2007/5/18/1
27510. Singh, Balbir. Memory controller v6 results, 26810. Singh, Balbir. Memory controller v6 test results,
276 http://lkml.org/lkml/2007/8/19/36 269 http://lkml.org/lkml/2007/8/19/36
27711. Singh, Balbir. Memory controller v6, http://lkml.org/lkml/2007/8/17/69 27011. Singh, Balbir. Memory controller introduction (v6),
271 http://lkml.org/lkml/2007/8/17/69
27812. Corbet, Jonathan, Controlling memory use in cgroups, 27212. Corbet, Jonathan, Controlling memory use in cgroups,
279 http://lwn.net/Articles/243795/ 273 http://lwn.net/Articles/243795/