Message ID | 20250124073514.2375622-2-chenridong@huaweicloud.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D505C02181 for <linux-mm@archiver.kernel.org>; Fri, 24 Jan 2025 07:46:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D6EE628004A; Fri, 24 Jan 2025 02:46:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CF88D280049; Fri, 24 Jan 2025 02:46:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B98EE28004A; Fri, 24 Jan 2025 02:46:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 97287280049 for <linux-mm@kvack.org>; Fri, 24 Jan 2025 02:46:49 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 5914A80A2F for <linux-mm@kvack.org>; Fri, 24 Jan 2025 07:46:49 +0000 (UTC) X-FDA: 83041563738.13.FB30176 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by imf03.hostedemail.com (Postfix) with ESMTP id 1812A2000C for <linux-mm@kvack.org>; Fri, 24 Jan 2025 07:46:46 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.hostedemail.com: domain of chenridong@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=chenridong@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737704807; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h7g+slmzehx27fWM3LRrwjskXwYl5mnp3YVL9gKL+cw=; b=IV/V8W3rDDQ6cItE3K+7GZ3Kwx4BAMmaZZ/qXAIXnMnu8PiEFLNrpgB9jx3afJ+3LXcIEs ni2lc9uSAPWK9Rga4YsBzXWEn2nJCb0TAovFfpPnGuGQEo6DjM/nhUmuNZY5WkaLK1ieaz jDE+ifTJJ2bztqNZanA5bfFq4WNhozo= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.hostedemail.com: domain of chenridong@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=chenridong@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737704807; a=rsa-sha256; cv=none; b=2OHdLhJkTgygj4s4K0rrlvl8IgYXmS0zzqDPVt6z9FInI1yxbhENrb1j2g86bCo5L0Ro+8 XYyhMBPgrrXjzx9o1v2YkCLyJ7/g1v6Ro7sBsTgTUC5W2TpyFSaBplFKqYPfGH/RR4mkLl yrXuximpGAtV9rIuqqkP2S0Y2PBjCYg= Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4YfVH53nQBz4f3jss for <linux-mm@kvack.org>; Fri, 24 Jan 2025 15:45:53 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 08EA11A1384 for <linux-mm@kvack.org>; Fri, 24 Jan 2025 15:46:09 +0800 (CST) Received: from hulk-vt.huawei.com (unknown [10.67.174.121]) by APP1 (Coremail) with SMTP id cCh0CgBHqnozRZNn89xFBw--.58969S3; Fri, 24 Jan 2025 15:46:08 +0800 (CST) From: Chen Ridong <chenridong@huaweicloud.com> To: akpm@linux-foundation.org, mhocko@kernel.org, hannes@cmpxchg.org, yosryahmed@google.com, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, davidf@vimeo.com, vbabka@suse.cz, mkoutny@suse.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, chenridong@huawei.com, wangweiyang2@huawei.com Subject: [PATCH -v4 next 1/4] memcg: use OFP_PEAK_UNSET instead of -1 Date: Fri, 24 Jan 2025 07:35:11 +0000 Message-Id: <20250124073514.2375622-2-chenridong@huaweicloud.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250124073514.2375622-1-chenridong@huaweicloud.com> References: <20250124073514.2375622-1-chenridong@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgBHqnozRZNn89xFBw--.58969S3 X-Coremail-Antispam: 1UD129KBjvdXoWrZFWrJF43Cw1xWrW5WrW8Crg_yoWfZrbE9F WkKr1DZF15J3yakw1FyrySvrsYkF1UGa43Kw45tw13AFyDtasYvF1vqrsY9w1kuFsxtry3 Cwnaqayqgw12gjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbDkYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r18M2 8IrcIa0xkI8VCY1x0267AKxVW8JVW5JwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK 021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F 4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0 oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7V C0I7IY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nUuv6c5kvY3XI1cc/t+wUaal12K0WjpZQRHQ0gYTu3Klx8012ZmLfo5RQ9zobjVaplu+Uq1o6Czz2vAwTu9B1ifJ9xilB3lZc90Htziu741ilH1Yd5Z+yGB6CafeTwX7otr6yDKJaOS8Hvw/oYGvhjOsVcIdvWItBgXd+8VWEZ1XNC8xupNMm2P34XSm0n5xWCmKW7RtLVooZBv9YztQvOazlu8kf6JqsElIfshF6c4rUjsLESY8xH72mAfju2Pa8h3YuLxdtbUpRaq/r5v0zGsWxcmh1WW+EYe8QKpMTk5oM1AlQqamzkzDQYeb1QkmJ8ZaC9C0HN2BSWbQTaVstAJaSeOde/TBvpjEdiyM2Ip2+nHYGup2pgBOy6chTZOEATMf7NRgjktdLOgFeAQ2xTf8EyBYb0XhlzCku88rt0cghDHEAZyez6J27GYe3TYMvO1LFmcMqrpweNBmnD1T9hI2aJnNOK3yYl1+dT5X+cm7zLuPuGupOaNy72OoPqhWXvPsiOjcgPF9PrZeHXaACT3L58OTvg2zY84S05PZ3hZcghChIUPl3VkHlpoVTnlW Vl7KOtgm DZ3qpVxx3EUbXzuw7nI2YdF1wrQox7+ePPcHcY2vuBJYpuHkdV5k80ZAALl0sfZdAqLP6qZlYc4XM1wlfcchZD1CYq2kM5649StQqAjQG/5XNa+Bl0O43d35cG9zYyNRS3qGI2gpERIbCga76c0c4zY1XsbGQYBkGzSy4B9KJy8s8NxCeaGMB3Jnuia0mYSiBm6EH4PAHM8YFIbLPU4y1ARSvlbub36o00X3Fzo2daZn8e/m2b0ARNqmH4DIgWaGsCM69ZFxWjvmiDh6ddeUub8u75pKzQizskJgQ6gnyfv3+OOIG/hq/I/DWfk+v0EbndHC5ru/dgei1aOyHOAkKikEy3hm0JnI2q1AkYeq8QkfP6A8= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series | Some cleanup for memcg | expand |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 46f8b372d212..05a32c860554 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4004,7 +4004,7 @@ static ssize_t peak_write(struct kernfs_open_file *of, char *buf, size_t nbytes, WRITE_ONCE(peer_ctx->value, usage); /* initial write, register watcher */ - if (ofp->value == -1) + if (ofp->value == OFP_PEAK_UNSET) list_add(&ofp->list, watchers); WRITE_ONCE(ofp->value, usage);