[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250117165615.GF182896@cmpxchg.org>
Date: Fri, 17 Jan 2025 11:56:15 -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 4/5] memcg: factor out
stat(event)/stat_local(event_local) reading functions
On Fri, Jan 17, 2025 at 01:46:44AM +0000, Chen Ridong wrote:
> From: Chen Ridong <chenridong@...wei.com>
>
> The only difference between 'lruvec_page_state' and
> 'lruvec_page_state_local' is that they read 'state' and 'state_local',
> respectively. Factor out an inner functions to make the code more concise.
> Do the same for reading 'memcg_page_stat' and 'memcg_events'.
>
> Signed-off-by: Chen Ridong <chenridong@...wei.com>
bool parameters make for poor readability at the callsites :(
With the next patch moving most of the duplication to memcontrol-v1.c,
I think it's probably not worth refactoring this.
Powered by blists - more mailing lists