From patchwork Tue Feb 1 00:46:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 12731331 Return-Path: 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 2233CC433F5 for ; Tue, 1 Feb 2022 00:47:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7B5908D0038; Mon, 31 Jan 2022 19:47:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 762B38D0028; Mon, 31 Jan 2022 19:47:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 604208D0038; Mon, 31 Jan 2022 19:47:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0179.hostedemail.com [216.40.44.179]) by kanga.kvack.org (Postfix) with ESMTP id 52A178D0028 for ; Mon, 31 Jan 2022 19:47:01 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 03EFF92EB2 for ; Tue, 1 Feb 2022 00:47:01 +0000 (UTC) X-FDA: 79092371442.08.9267F09 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by imf03.hostedemail.com (Postfix) with ESMTP id 9DDE920005 for ; Tue, 1 Feb 2022 00:47:00 +0000 (UTC) Received: by mail-ej1-f44.google.com with SMTP id p15so48467182ejc.7 for ; Mon, 31 Jan 2022 16:47:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=uPVLcxrrpf12Ei4lWc6lSHRXgw8cc0G/gavfe4Q9af4=; b=hdpLvN0QxInM8+zBsj9rlh83NVjYyFJoIFuN/De4NAA9EcVJhT7Wqhkcj75YZEeEV2 th2W52TZaFlmrPuVbf6bmepEh9nDGgI4CSDd+GaLoRrX1GocorJrKLmA9JiVmpB6t8s5 66kbKsZny0SG2cCxsmhC78eAk8a3CPKbs558vyZgfnz46XL3sxK28SQN2uG3f6XLjnzl LNghAm/XyZAZInH39ADFZhe9ctC11i3g7jcQor7TRZxqtGO16EuWNH8wT2AC3cDP3IuA 0C0BTkQ33c8fKzbuibkJDmgEw1NtwrOcnpFtlrZOFnPEaDzl3jCxB+jJoKQlGI40mEK6 Gi2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uPVLcxrrpf12Ei4lWc6lSHRXgw8cc0G/gavfe4Q9af4=; b=0baR9s/rqmwD4HFgrkB0G5t7+iIuNltl1ZbD7MlR8qfQ1YdX6oB0LeCoNH98Z4NJnR 3hVO5hzTq4hpBYIDhQJPMJAVcG/AzX6r+rVP/0U9g5N7ppZdqY6h5E6fgejPDgA9yNBV S1I7Dnn8ibxa9BgXCL/aBNgRJJkCZNU2GTZLrNysnPOddTuGR5fckVFKjFwq8r03M5bz Im5oi6HOQykJmAsvEbhKT+tOoOeTf1kioHz/wOrVylP4bNtwAlZJUeceRXjTF+jgro9G iK397iUWG5zhON7YijFBAWiGL9hng1ZRBTAg7woqi5mSo4CIkCoNjW1+XnhYMKiGmGsN oaBg== X-Gm-Message-State: AOAM530GAvtDTQVAoQnBeUuC33sQd+jJIpGX0ijennHaNY+2Ryq1oEL/ AapktpvwC8kgLO5+FvOS6D0= X-Google-Smtp-Source: ABdhPJw8HWmyZMvyKUz/GCpLFtIhWj2bZvqHd92ATTkn5xbAydEP5bf6sPKyPc0j527YW5ynQlVdrQ== X-Received: by 2002:a17:907:c19:: with SMTP id ga25mr20364151ejc.606.1643676419516; Mon, 31 Jan 2022 16:46:59 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id v10sm18500935edx.36.2022.01.31.16.46.58 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Jan 2022 16:46:59 -0800 (PST) From: Wei Yang To: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, akpm@linux-foundation.org, shakeelb@google.com, guro@fb.com, willy@infradead.org, songmuchun@bytedance.com, shy828301@gmail.com, surenb@google.com Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, vbabka@suse.cz, Wei Yang Subject: [PATCH 1/2] mm/memcg: mem_cgroup_per_node is already set to 0 on allocation Date: Tue, 1 Feb 2022 00:46:42 +0000 Message-Id: <20220201004643.8391-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspam-User: nil X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 9DDE920005 X-Stat-Signature: z1yc95qrhf17s6e98kbgkmnd59dssa6q Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hdpLvN0Q; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.44 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com X-HE-Tag: 1643676420-304754 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: kzalloc_node() would set data to 0, so it's not necessary to set it again. Signed-off-by: Wei Yang Reviewed-by: Muchun Song Acked-by: Michal Hocko Reviewed-by: Roman Gushchin Reviewed-by: Mike Rapoport Reviewed-by: Shakeel Butt --- mm/memcontrol.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index ea8460658550..ce7060907df2 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5070,8 +5070,6 @@ static int alloc_mem_cgroup_per_node_info(struct mem_cgroup *memcg, int node) } lruvec_init(&pn->lruvec); - pn->usage_in_excess = 0; - pn->on_tree = false; pn->memcg = memcg; memcg->nodeinfo[node] = pn;