cgroup: Documentation: Clarify usage of memory limits
authorDan Schatzberg <schatzberg.dan@gmail.com>
Thu, 1 Jun 2023 18:38:19 +0000 (11:38 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 6 Jun 2023 00:08:12 +0000 (14:08 -1000)
commit5647e53f7856bb39dae781fe26aa65a699e2fc9f
tree22f19fd1a0b85b51e50df0f414235941af913790
parent2bd110339288c18823dcace602b63b0d8627e520
cgroup: Documentation: Clarify usage of memory limits

The existing documentation refers to memory.high as the "main mechanism
to control memory usage." This seems incorrect to me - memory.high can
result in reclaim pressure which simply leads to stalls unless some
external component observes and actions on it (e.g. systemd-oomd can be
used for this purpose). While this is feasible, users are unaware of
this interaction and are led to believe that memory.high alone is an
effective mechanism for limiting memory.

The documentation should recommend the use of memory.max as the
effective way to enforce memory limits - it triggers reclaim and results
in OOM kills by itself.

Signed-off-by: Dan Schatzberg <schatzberg.dan@gmail.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Chris Down <chris@chrisdown.name>
Signed-off-by: Tejun Heo <tj@kernel.org>
Documentation/admin-guide/cgroup-v2.rst