From: Xu Yu <xuyu@linux.alibaba.com>
To: cgroups@vger.kernel.org
Cc: linux-mm@kvack.org, hannes@cmpxchg.org, mhocko@kernel.org,
vdavydov.dev@gmail.com
Subject: [PATCH] mm, memcg: fix comment error about memory.low usage
Date: Mon, 23 Dec 2019 16:56:56 +0800 [thread overview]
Message-ID: <0505ec19cc077cf32d7175ffea121e2130c64590.1577090923.git.xuyu@linux.alibaba.com> (raw)
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(-)
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
--
1.8.3.1
next reply other threads:[~2019-12-23 8:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 8:56 Xu Yu [this message]
2019-12-23 16:52 ` Roman Gushchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0505ec19cc077cf32d7175ffea121e2130c64590.1577090923.git.xuyu@linux.alibaba.com \
--to=xuyu@linux.alibaba.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=vdavydov.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox