From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84321C4727F for ; Wed, 30 Sep 2020 09:55:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 059792076B for ; Wed, 30 Sep 2020 09:55:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 059792076B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0688C6B005C; Wed, 30 Sep 2020 05:55:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F34936B005D; Wed, 30 Sep 2020 05:55:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E22996B0068; Wed, 30 Sep 2020 05:55:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id C90FA6B005C for ; Wed, 30 Sep 2020 05:55:13 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 87FE8181DA0AC for ; Wed, 30 Sep 2020 09:55:13 +0000 (UTC) X-FDA: 77319269706.17.smell19_4d137a127191 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 6312A181C5555 for ; Wed, 30 Sep 2020 09:55:13 +0000 (UTC) X-HE-Tag: smell19_4d137a127191 X-Filterd-Recvd-Size: 2427 Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 30 Sep 2020 09:55:12 +0000 (UTC) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4E394DBEC0FDEECB944F; Wed, 30 Sep 2020 17:55:09 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Wed, 30 Sep 2020 17:54:59 +0800 From: Miaohe Lin To: , , , CC: , , , Subject: [PATCH v3] mm: memcontrol: reword obsolete comment of mem_cgroup_unmark_under_oom() Date: Wed, 30 Sep 2020 05:53:36 -0400 Message-ID: <20200930095336.21323-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Content-Transfer-Encoding: quoted-printable 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: Since commit 79dfdaccd1d5 ("memcg: make oom_lock 0 and 1 based rather tha= n counter"), the mem_cgroup_unmark_under_oom() is added and the comment of the mem_cgroup_oom_unlock() is moved here. But this comment make no sens= e here because mem_cgroup_oom_lock() does not operate on under_oom field. S= o we reword the comment as this would be helpful. [Thanks Michal Hocko for rewording this comment.] Signed-off-by: Miaohe Lin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov --- mm/memcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6877c765b8d0..4f0c14cb8690 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1817,8 +1817,8 @@ static void mem_cgroup_unmark_under_oom(struct mem_= cgroup *memcg) struct mem_cgroup *iter; =20 /* - * When a new child is created while the hierarchy is under oom, - * mem_cgroup_oom_lock() may not be called. Watch for underflow. + * Be careful about under_oom underflows becase a child memcg + * could have been added after mem_cgroup_mark_under_oom. */ spin_lock(&memcg_oom_lock); for_each_mem_cgroup_tree(iter, memcg) --=20 2.19.1