Re: [PATCH -next v3 2/2] memcg: remove mem_cgroup_size()
From: Shakeel Butt
Date: Thu Dec 11 2025 - 19:38:02 EST
On Thu, Dec 11, 2025 at 01:30:19AM +0000, Chen Ridong wrote:
> From: Chen Ridong <chenridong@xxxxxxxxxx>
>
> The mem_cgroup_size helper is used only in apply_proportional_protection
> to read the current memory usage. Its semantics are unclear and
> inconsistent with other sites, which directly call page_counter_read for
> the same purpose.
>
> Remove this helper and get its usage via mem_cgroup_protection for
> clarity. Additionally, rename the local variable 'cgroup_size' to 'usage'
> to better reflect its meaning.
>
> No functional changes intended.
>
> Signed-off-by: Chen Ridong <chenridong@xxxxxxxxxx>
Acked-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>