diff options
author | Glauber Costa <glommer@parallels.com> | 2011-12-21 20:02:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-22 22:37:18 -0500 |
commit | 65c64ce8ee642eb330a4c4d94b664725f2902b44 (patch) | |
tree | c4ad98c2a7f839f3b968fae6eddeec8b5752ce49 /Documentation | |
parent | 7d6c429b263c2f735f3df8c282cc77a8659e5d74 (diff) |
Partial revert "Basic kernel memory functionality for the Memory Controller"
This reverts commit e5671dfae59b165e2adfd4dfbdeab11ac8db5bda.
After a follow up discussion with Michal, it was agreed it would
be better to leave the kmem controller with just the tcp files,
deferring the behavior of the other general memory.kmem.* files
for a later time, when more caches are controlled. This is because
generic kmem files are not used by tcp accounting and it is
not clear how other slab caches would fit into the scheme.
We are reverting the original commit so we can track the reference.
Part of the patch is kept, because it was used by the later tcp
code. Conflicts are shown in the bottom. init/Kconfig is removed from
the revert entirely.
Signed-off-by: Glauber Costa <glommer@parallels.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
CC: Kirill A. Shutemov <kirill@shutemov.name>
CC: Paul Menage <paul@paulmenage.org>
CC: Greg Thelen <gthelen@google.com>
CC: Johannes Weiner <jweiner@redhat.com>
CC: David S. Miller <davem@davemloft.net>
Conflicts:
Documentation/cgroups/memory.txt
mm/memcontrol.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/cgroups/memory.txt | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 6922b6cb58e3..4d8774f6f48a 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -44,9 +44,8 @@ Features: | |||
44 | - oom-killer disable knob and oom-notifier | 44 | - oom-killer disable knob and oom-notifier |
45 | - Root cgroup has no limit controls. | 45 | - Root cgroup has no limit controls. |
46 | 46 | ||
47 | Hugepages is not under control yet. We just manage pages on LRU. To add more | 47 | Kernel memory support is work in progress, and the current version provides |
48 | controls, we have to take care of performance. Kernel memory support is work | 48 | basically functionality. (See Section 2.7) |
49 | in progress, and the current version provides basically functionality. | ||
50 | 49 | ||
51 | Brief summary of control files. | 50 | Brief summary of control files. |
52 | 51 | ||
@@ -57,11 +56,8 @@ Brief summary of control files. | |||
57 | (See 5.5 for details) | 56 | (See 5.5 for details) |
58 | memory.memsw.usage_in_bytes # show current res_counter usage for memory+Swap | 57 | memory.memsw.usage_in_bytes # show current res_counter usage for memory+Swap |
59 | (See 5.5 for details) | 58 | (See 5.5 for details) |
60 | memory.kmem.usage_in_bytes # show current res_counter usage for kmem only. | ||
61 | (See 2.7 for details) | ||
62 | memory.limit_in_bytes # set/show limit of memory usage | 59 | memory.limit_in_bytes # set/show limit of memory usage |
63 | memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage | 60 | memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage |
64 | memory.kmem.limit_in_bytes # if allowed, set/show limit of kernel memory | ||
65 | memory.failcnt # show the number of memory usage hits limits | 61 | memory.failcnt # show the number of memory usage hits limits |
66 | memory.memsw.failcnt # show the number of memory+Swap hits limits | 62 | memory.memsw.failcnt # show the number of memory+Swap hits limits |
67 | memory.max_usage_in_bytes # show max memory usage recorded | 63 | memory.max_usage_in_bytes # show max memory usage recorded |
@@ -76,8 +72,6 @@ Brief summary of control files. | |||
76 | memory.oom_control # set/show oom controls. | 72 | memory.oom_control # set/show oom controls. |
77 | memory.numa_stat # show the number of memory usage per numa node | 73 | memory.numa_stat # show the number of memory usage per numa node |
78 | 74 | ||
79 | memory.independent_kmem_limit # select whether or not kernel memory limits are | ||
80 | independent of user limits | ||
81 | memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory | 75 | memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory |
82 | memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation | 76 | memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation |
83 | 77 | ||
@@ -271,21 +265,9 @@ the amount of kernel memory used by the system. Kernel memory is fundamentally | |||
271 | different than user memory, since it can't be swapped out, which makes it | 265 | different than user memory, since it can't be swapped out, which makes it |
272 | possible to DoS the system by consuming too much of this precious resource. | 266 | possible to DoS the system by consuming too much of this precious resource. |
273 | 267 | ||
274 | Some kernel memory resources may be accounted and limited separately from the | ||
275 | main "kmem" resource. For instance, a slab cache that is considered important | ||
276 | enough to be limited separately may have its own knobs. | ||
277 | |||
278 | Kernel memory limits are not imposed for the root cgroup. Usage for the root | 268 | Kernel memory limits are not imposed for the root cgroup. Usage for the root |
279 | cgroup may or may not be accounted. | 269 | cgroup may or may not be accounted. |
280 | 270 | ||
281 | Memory limits as specified by the standard Memory Controller may or may not | ||
282 | take kernel memory into consideration. This is achieved through the file | ||
283 | memory.independent_kmem_limit. A Value different than 0 will allow for kernel | ||
284 | memory to be controlled separately. | ||
285 | |||
286 | When kernel memory limits are not independent, the limit values set in | ||
287 | memory.kmem files are ignored. | ||
288 | |||
289 | Currently no soft limit is implemented for kernel memory. It is future work | 271 | Currently no soft limit is implemented for kernel memory. It is future work |
290 | to trigger slab reclaim when those limits are reached. | 272 | to trigger slab reclaim when those limits are reached. |
291 | 273 | ||