diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2020-04-01 21:07:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-04-02 09:35:28 -0700 |
commit | bc50bcc6e00b8509e64875c674f4573e8b4df1e8 (patch) | |
tree | e04c3924e9354e7a0bd529ae7a60b2e66b2bfe88 /kernel/printk | |
parent | 503970e42325c9e6ace59c75b6213fa2e03abdb9 (diff) | |
download | linux-bc50bcc6e00b8509e64875c674f4573e8b4df1e8.tar.gz linux-bc50bcc6e00b8509e64875c674f4573e8b4df1e8.tar.bz2 linux-bc50bcc6e00b8509e64875c674f4573e8b4df1e8.zip |
mm: memcontrol: clean up and document effective low/min calculations
The effective protection of any given cgroup is a somewhat complicated
construct that depends on the ancestor's configuration, siblings'
configurations, as well as current memory utilization in all these groups.
It's done this way to satisfy hierarchical delegation requirements while
also making the configuration semantics flexible and expressive in complex
real life scenarios.
Unfortunately, all the rules and requirements are sparsely documented, and
the code is a little too clever in merging different scenarios into a
single min() expression. This makes it hard to reason about the
implementation and avoid breaking semantics when making changes to it.
This patch documents each semantic rule individually and splits out the
handling of the overcommit case from the regular case.
Michal Koutný also points out that the points of equilibrium as described
in the existing example scenarios aren't actually accurate. Delete these
examples for now to avoid confusion.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Roman Gushchin <guro@fb.com>
Acked-by: Chris Down <chris@chrisdown.name>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Michal Koutný <mkoutny@suse.com>
Link: http://lkml.kernel.org/r/20200227195606.46212-3-hannes@cmpxchg.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/printk')
0 files changed, 0 insertions, 0 deletions