From patchwork Tue Jan 11 01:03:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 12709357 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 BB2FCC4332F for ; Tue, 11 Jan 2022 01:03:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D32A6B0073; Mon, 10 Jan 2022 20:03:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 380636B0074; Mon, 10 Jan 2022 20:03:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1ACC96B0078; Mon, 10 Jan 2022 20:03:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0069.hostedemail.com [216.40.44.69]) by kanga.kvack.org (Postfix) with ESMTP id 00F7A6B0074 for ; Mon, 10 Jan 2022 20:03:06 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A2CF3824C421 for ; Tue, 11 Jan 2022 01:03:06 +0000 (UTC) X-FDA: 79016207172.28.CD0F61E Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by imf11.hostedemail.com (Postfix) with ESMTP id 62C5D4000F for ; Tue, 11 Jan 2022 01:03:06 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id i5so7166810edf.9 for ; Mon, 10 Jan 2022 17:03:06 -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:in-reply-to:references; bh=cOmBhmo4B4Ukm6s0FflMe2nP4T2kTWokfAC8k0+Tp8A=; b=YdgiRcT5b4ToQFSxyF5G4EFVb1dSoHDJMo4BUDntHy0fbYJAVvGNz2aLcQ9HPdOnrG Z1sygXtxjEKW5l21yHQYo6TMcsMuKs8+IwB4Bm5KBUiS2pCZK5M/by1eZa65loOVD11n /fQN9xKi5oCnon17uwfJ83+pqOmbLnfQ4gAuhkLEOrTz96IMpxOLoC6hD0ZugnSWdQ5f oMkmm+o+nQUJ9UZYxNmro9tT+l6fj5/Gssaid2pvz+RMJj7hjueA9Gk7AjS+CDpqSncg kiDq+AS7sukqRCjwLFbsn03pN318DzDzfQiZcvXxyZEpfYs8luKYAB85EAZG+JX0dren X+XA== 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:in-reply-to :references; bh=cOmBhmo4B4Ukm6s0FflMe2nP4T2kTWokfAC8k0+Tp8A=; b=UtYZH6Hu/HZcItR6xynwZ0J27pBi9c1DDJqN2Xb6q1E12103Tp2YcqMRiIdi25545o hiYfuDnqEoQpg4g+81aWSJJBioSMUnYIUczg6Jl6EP6mJIIsZ5jwTkEWyKxyRXlxZevH xlHNxc6T/5utuZwUqdHbq0KARhfKMigs0v9h1y19Asl4RANxf3ghGUxn9ckAhAQTI+m/ XvAsZQXypdufa3fmtvqHoHnhatn50E9QLuVQS0E9UN+YkGHR1mmLVSW1iTlGkAv0YVzr 36oNXKWP+zIIoIGG1OilxRcA8vwNStVMaCv9hkUwxyUroo9lx75Vr070G2DBRXRkUcw1 ddug== X-Gm-Message-State: AOAM532ZbsyjM7W1BRKtTH1Zuog3hDkbMW1gar/FJHm8osl/esgeF2xY /06mwyDefoT5dQ4rAs6r5nA= X-Google-Smtp-Source: ABdhPJxdEYNE0zGnRtVv966sHQg3qTYvZay17m6gYLTCfaNoG9QG4hGa8q87+UBkeLJYqwCUWADsBg== X-Received: by 2002:a05:6402:3496:: with SMTP id v22mr2107340edc.263.1641862985361; Mon, 10 Jan 2022 17:03:05 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 18sm2968137ejo.8.2022.01.10.17.03.04 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jan 2022 17:03:05 -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, vbabka@suse.cz, 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, Wei Yang Subject: [PATCH 2/4] mm/memcg: mem_cgroup_per_node is already set to 0 on allocation Date: Tue, 11 Jan 2022 01:03:00 +0000 Message-Id: <20220111010302.8864-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20220111010302.8864-1-richard.weiyang@gmail.com> References: <20220111010302.8864-1-richard.weiyang@gmail.com> X-Stat-Signature: 9kerusnsn1wpnjtrqt9a6p36dph4tzym Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YdgiRcT5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 62C5D4000F X-HE-Tag: 1641862986-268712 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 11715f7323c0..a504616f904a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5067,8 +5067,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;