Message ID | 0505ec19cc077cf32d7175ffea121e2130c64590.1577090923.git.xuyu@linux.alibaba.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm, memcg: fix comment error about memory.low usage | expand |
On Mon, Dec 23, 2019 at 04:56:56PM +0800, Xu Yu wrote: > When memory.current > memory.low, the usage of memory.low should be the > value of memory.low, not 0. > > Fix and simplify the equation in comments. Hello, Xu! There is a pending patchset from Johannes, which performs a significant rework of this code: https://lkml.org/lkml/2019/12/19/1272 . Please, take a look. Thanks!
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c5b5f74..def95a5 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6236,9 +6236,7 @@ struct cgroup_subsys memory_cgrp_subsys = { * elow = min( memory.low, parent->elow * ------------------ ), * siblings_low_usage * - * | memory.current, if memory.current < memory.low - * low_usage = | - * | 0, otherwise. + * low_usage = min( memory.current, memory.low ) * * * Such definition of the effective memory.low provides the expected
When memory.current > memory.low, the usage of memory.low should be the value of memory.low, not 0. Fix and simplify the equation in comments. Signed-off-by: Xu Yu <xuyu@linux.alibaba.com> --- mm/memcontrol.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)