Skip to content

Commit 7854207

Browse files
Roman Gushchintorvalds
authored andcommitted
mm/docs: describe memory.low refinements
Refine cgroup v2 docs after latest memory.low changes. Link: http://lkml.kernel.org/r/20180405185921.4942-4-guro@fb.com Signed-off-by: Roman Gushchin <guro@fb.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5f93ad6 commit 7854207

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

‎Documentation/admin-guide/cgroup-v2.rst‎

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,10 +1005,17 @@ PAGE_SIZE multiple when read back.
10051005
A read-write single value file which exists on non-root
10061006
cgroups. The default is "0".
10071007

1008-
Best-effort memory protection. If the memory usages of a
1009-
cgroup and all its ancestors are below their low boundaries,
1010-
the cgroup's memory won't be reclaimed unless memory can be
1011-
reclaimed from unprotected cgroups.
1008+
Best-effort memory protection. If the memory usage of a
1009+
cgroup is within its effective low boundary, the cgroup's
1010+
memory won't be reclaimed unless memory can be reclaimed
1011+
from unprotected cgroups.
1012+
1013+
Effective low boundary is limited by memory.low values of
1014+
all ancestor cgroups. If there is memory.low overcommitment
1015+
(child cgroup or cgroups are requiring more protected memory,
1016+
than parent will allow), then each child cgroup will get
1017+
the part of parent's protection proportional to the its
1018+
actual memory usage below memory.low.
10121019

10131020
Putting more memory than generally available under this
10141021
protection is discouraged.
@@ -1950,17 +1957,8 @@ system performance due to overreclaim, to the point where the feature
19501957
becomes self-defeating.
19511958

19521959
The memory.low boundary on the other hand is a top-down allocated
1953-
reserve. A cgroup enjoys reclaim protection when it and all its
1954-
ancestors are below their low boundaries, which makes delegation of
1955-
subtrees possible. Secondly, new cgroups have no reserve per default
1956-
and in the common case most cgroups are eligible for the preferred
1957-
reclaim pass. This allows the new low boundary to be efficiently
1958-
implemented with just a minor addition to the generic reclaim code,
1959-
without the need for out-of-band data structures and reclaim passes.
1960-
Because the generic reclaim code considers all cgroups except for the
1961-
ones running low in the preferred first reclaim pass, overreclaim of
1962-
individual groups is eliminated as well, resulting in much better
1963-
overall workload performance.
1960+
reserve. A cgroup enjoys reclaim protection when it's within its low,
1961+
which makes delegation of subtrees possible.
19641962

19651963
The original high boundary, the hard limit, is defined as a strict
19661964
limit that can not budge, even if the OOM killer has to be called.

0 commit comments

Comments
 (0)