[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250117164748.GD182896@cmpxchg.org>
Date: Fri, 17 Jan 2025 11:47:48 -0500
From: Johannes Weiner <hannes@...xchg.org>
To: Chen Ridong <chenridong@...weicloud.com>
Cc: akpm@...ux-foundation.org, mhocko@...nel.org, yosryahmed@...gle.com,
roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
muchun.song@...ux.dev, davidf@...eo.com, vbabka@...e.cz,
mkoutny@...e.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, chenridong@...wei.com,
wangweiyang2@...wei.com
Subject: Re: [PATCH v3 next 2/5] memcg: call the free function when
allocation of pn fails
On Fri, Jan 17, 2025 at 01:46:42AM +0000, Chen Ridong wrote:
> From: Chen Ridong <chenridong@...wei.com>
>
> The 'free_mem_cgroup_per_node_info' function is used to free
> the 'mem_cgroup_per_node' struct. Using 'pn' as the input for the
> free_mem_cgroup_per_node_info function will be much clearer.
> Call 'free_mem_cgroup_per_node_info' when 'alloc_mem_cgroup_per_node_info'
> fails, to free 'pn' as a whole, which makes the code more cohesive.
>
> Signed-off-by: Chen Ridong <chenridong@...wei.com>
> Reviewed-by: Michal Koutný <mkoutny@...e.com>
> Acked-by: Shakeel Butt <shakeel.butt@...ux.dev>
Acked-by: Johannes Weiner <hannes@...xchg.org>
Powered by blists - more mailing lists