diff options
-rw-r--r-- | Documentation/controllers/memory.txt | 24 |
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, | |||
170 | mega or gigabytes. | 170 | mega or gigabytes. |
171 | 171 | ||
172 | # cat /cgroups/0/memory.limit_in_bytes | 172 | # cat /cgroups/0/memory.limit_in_bytes |
173 | 4194304 Bytes | 173 | 4194304 |
174 | 174 | ||
175 | NOTE: The interface has now changed to display the usage in bytes | 175 | NOTE: The interface has now changed to display the usage in bytes |
176 | instead of pages | 176 | instead of pages |
177 | 177 | ||
178 | We can check the usage: | 178 | We can check the usage: |
179 | # cat /cgroups/0/memory.usage_in_bytes | 179 | # cat /cgroups/0/memory.usage_in_bytes |
180 | 1216512 Bytes | 180 | 1216512 |
181 | 181 | ||
182 | A successful write to this file does not guarantee a successful set of | 182 | A successful write to this file does not guarantee a successful set of |
183 | this limit to the value written into the file. This can be due to a | 183 | this 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 |
190 | 4096 Bytes | 190 | 4096 |
191 | 191 | ||
192 | The memory.failcnt field gives the number of times that the cgroup limit was | 192 | The memory.failcnt field gives the number of times that the cgroup limit was |
193 | exceeded. | 193 | exceeded. |
@@ -233,13 +233,6 @@ cgroup might have some charge associated with it, even though all | |||
233 | tasks have migrated away from it. Such charges are automatically dropped at | 233 | tasks have migrated away from it. Such charges are automatically dropped at |
234 | rmdir() if there are no tasks. | 234 | rmdir() if there are no tasks. |
235 | 235 | ||
236 | 4.4 Choosing what to account -- Page Cache (unmapped) vs RSS (mapped)? | ||
237 | |||
238 | The type of memory accounted by the cgroup can be limited to just | ||
239 | mapped pages by writing "1" to memory.control_type field | ||
240 | |||
241 | echo -n 1 > memory.control_type | ||
242 | |||
243 | 5. TODO | 236 | 5. TODO |
244 | 237 | ||
245 | 1. Add support for accounting huge pages (as a separate controller) | 238 | 1. Add support for accounting huge pages (as a separate controller) |
@@ -262,18 +255,19 @@ References | |||
262 | 3. Emelianov, Pavel. Resource controllers based on process cgroups | 255 | 3. 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 |
264 | 4. Emelianov, Pavel. RSS controller based on process cgroups (v2) | 257 | 4. 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 |
266 | 5. Emelianov, Pavel. RSS controller based on process cgroups (v3) | 259 | 5. 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 |
268 | 6. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/ | 261 | 6. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/ |
269 | 7. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and control | 262 | 7. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and control |
270 | subsystem (v3), http://lwn.net/Articles/235534/ | 263 | subsystem (v3), http://lwn.net/Articles/235534/ |
271 | 8. Singh, Balbir. RSS controller V2 test results (lmbench), | 264 | 8. 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 |
273 | 9. Singh, Balbir. RSS controller V2 AIM9 results | 266 | 9. 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 |
275 | 10. Singh, Balbir. Memory controller v6 results, | 268 | 10. 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 |
277 | 11. Singh, Balbir. Memory controller v6, http://lkml.org/lkml/2007/8/17/69 | 270 | 11. Singh, Balbir. Memory controller introduction (v6), |
271 | http://lkml.org/lkml/2007/8/17/69 | ||
278 | 12. Corbet, Jonathan, Controlling memory use in cgroups, | 272 | 12. Corbet, Jonathan, Controlling memory use in cgroups, |
279 | http://lwn.net/Articles/243795/ | 273 | http://lwn.net/Articles/243795/ |