Re: [RFC PATCH 05/10] memcg: no refilling stock from obj_cgroup_release

From: Shakeel Butt
Date: Fri Mar 14 2025 - 11:25:32 EST


On Fri, Mar 14, 2025 at 12:26:27PM +0100, Sebastian Andrzej Siewior wrote:
> On 2025-03-13 23:15:06 [-0700], Shakeel Butt wrote:
> > obj_cgroup_release is called when all the references to the objcg has
>
> "references to the objcg have"
>
> > been released i.e. no more memory objects are pointing to it. Most
> > probably objcg->memcg will be pointing to some ancestor memcg and at the
> > moment, in obj_cgroup_release, the kernel call
> > obj_cgroup_uncharge_pages() to uncharge last remaining memory.
>
> This sounds somehow funny. I think the point is to uncharge the pages
> without tampering memcg_stock because it is unnecessary.
>

Thanks, I will see to make the point more clean in the next version.