summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2020-04-02 06:07:03 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 18:35:28 +0200
commitbc50bcc6e00b8509e64875c674f4573e8b4df1e8 (patch)
treee04c3924e9354e7a0bd529ae7a60b2e66b2bfe88 /kernel/cgroup
parentmm: memcontrol: fix memory.low proportional distribution (diff)
downloadlinux-bc50bcc6e00b8509e64875c674f4573e8b4df1e8.tar.xz
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/cgroup')
0 files changed, 0 insertions, 0 deletions