enable CONFIG_MEMCG_KMEM
Bug #1309586 reported by
Serge Hallyn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Medium
|
Tim Gardner | ||
Trusty |
Fix Released
|
Medium
|
Tim Gardner | ||
Utopic |
Invalid
|
Medium
|
Tim Gardner |
Bug Description
CONFIG_MEMCG_KMEM is disabled in the trusty kernel. It's the recommended way to prevent forkbombs, so if there's not a good reason to have it disabled, it would be great if that could be changed.
tags: | added: trusty |
Changed in linux (Ubuntu Trusty): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Trusty): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu): | |
status: | Fix Committed → Invalid |
Changed in linux (Ubuntu Utopic): | |
status: | Fix Committed → Invalid |
To post a comment you must log in.
Documentation/ cgroups/ memory. txt:
2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM)
With the Kernel memory extension, the Memory Controller is able to limit
the amount of kernel memory used by the system. Kernel memory is fundamentally
different than user memory, since it can't be swapped out, which makes it
possible to DoS the system by consuming too much of this precious resource.
Kernel memory won't be accounted at all until limit on a group is set. This
allows for existing setups to continue working without disruption. The limit
cannot be set if the cgroup have children, or if there are already tasks in the
cgroup. Attempting to set the limit under those conditions will return -EBUSY.
When use_hierarchy == 1 and a group is accounted, its children will
automatically be accounted regardless of their limit value.
After a group is first limited, it will be kept being accounted until it kmem.limit_ in_bytes. In this case, kmem will be accounted, but not
is removed. The memory limitation itself, can of course be removed by writing
-1 to memory.
limited.
Kernel memory limits are not imposed for the root cgroup. Usage for the root kmem.usage_ in_bytes, or in a separate counter when it makes sense.
cgroup may or may not be accounted. The memory used is accumulated into
memory.
(currently only for tcp).
The main "kmem" counter is fed into the main counter, so kmem charges will
also be visible from the user counter.
Currently no soft limit is implemented for kernel memory. It is future work
to trigger slab reclaim when those limits are reached.