From patchwork Mon Dec 23 08:56:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yu X-Patchwork-Id: 11307917 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BF058138D for ; Mon, 23 Dec 2019 08:57:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A02772081E for ; Mon, 23 Dec 2019 08:57:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A02772081E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B404E8E0005; Mon, 23 Dec 2019 03:57:14 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AF13E8E0001; Mon, 23 Dec 2019 03:57:14 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2E2F8E0005; Mon, 23 Dec 2019 03:57:14 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id 8FD538E0001 for ; Mon, 23 Dec 2019 03:57:14 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 2CFA87582 for ; Mon, 23 Dec 2019 08:57:14 +0000 (UTC) X-FDA: 76295801988.03.plot26_3f0433bafd22a X-Spam-Summary: 2,0,0,6c3795356dbdff84,d41d8cd98f00b204,xuyu@linux.alibaba.com,:cgroups@vger.kernel.org::hannes@cmpxchg.org:mhocko@kernel.org:vdavydov.dev@gmail.com,RULES_HIT:41:69:355:379:541:960:973:988:989:1260:1261:1345:1437:1534:1540:1711:1730:1747:1777:1792:1801:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3868:3870:4321:4605:5007:6261:10004:11026:11658:11914:12296:12297:12555:12895:13069:13311:13357:14096:14181:14384:14394:14721:21080:21627:21990:30054,0,RBL:115.124.30.57:@linux.alibaba.com:.lbl8.mailshell.net-62.20.2.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:26,LUA_SUMMARY:none X-HE-Tag: plot26_3f0433bafd22a X-Filterd-Recvd-Size: 1862 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Dec 2019 08:57:12 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R341e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=xuyu@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0TlhKIye_1577091417; Received: from localhost(mailfrom:xuyu@linux.alibaba.com fp:SMTPD_---0TlhKIye_1577091417) by smtp.aliyun-inc.com(127.0.0.1); Mon, 23 Dec 2019 16:57:03 +0800 From: Xu Yu 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 Message-Id: <0505ec19cc077cf32d7175ffea121e2130c64590.1577090923.git.xuyu@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 --- 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