Re: [PATCH v5 03/11] mm: memcontrol: prepare objcg API for non-kmem usage
From: Muchun Song
Date: Wed Jun 01 2022 - 23:07:03 EST
On Wed, Jun 01, 2022 at 07:34:34PM +0200, Michal Koutný wrote:
> Hello.
>
> On Mon, May 30, 2022 at 03:49:11PM +0800, Muchun Song <songmuchun@xxxxxxxxxxxxx> wrote:
> > So we also allocate an object cgroup for the root_mem_cgroup.
>
> This change made me wary that this patch also kmem charging in the
> root_mem_cgroup. Fortunately, get_obj_cgroup_from_current won't return
Sorry for the confusing. Right, we don't charge kmem to the root objcg.
> this objcg so all is fine.
>
> > +}
> > +#else
> > +static inline void obj_cgroup_release_bytes(struct obj_cgroup *objcg)
> > +{
> > +}
> > +#endif
>
> This empty body is for !CONFIG_MEMCG_KMEM, however, the subsequent use for LRU
> pages makes no use of these, so it's warranted.
>
> Altogether, I find this correct, hence
> Reviewed-by: Michal Koutný <mkoutny@xxxxxxxx>
>
Thanks Michal.