[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220201004643.8391-1-richard.weiyang@gmail.com>
Date: Tue, 1 Feb 2022 00:46:42 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: hannes@...xchg.org, mhocko@...nel.org, vdavydov.dev@...il.com,
akpm@...ux-foundation.org, shakeelb@...gle.com, guro@...com,
willy@...radead.org, songmuchun@...edance.com, shy828301@...il.com,
surenb@...gle.com
Cc: linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
linux-mm@...ck.org, vbabka@...e.cz,
Wei Yang <richard.weiyang@...il.com>
Subject: [PATCH 1/2] mm/memcg: mem_cgroup_per_node is already set to 0 on allocation
kzalloc_node() would set data to 0, so it's not necessary to set it
again.
Signed-off-by: Wei Yang <richard.weiyang@...il.com>
Reviewed-by: Muchun Song <songmuchun@...edance.com>
Acked-by: Michal Hocko <mhocko@...e.com>
Reviewed-by: Roman Gushchin <guro@...com>
Reviewed-by: Mike Rapoport <rppt@...ux.ibm.com>
Reviewed-by: Shakeel Butt <shakeelb@...gle.com>
---
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;
--
2.33.1
Powered by blists - more mailing lists