[LTP] [RFC PATCH] mm: memcg/slab: Stop reparented obj_cgroups from charging root
Richard Palethorpe
rpalethorpe@suse.de
Fri Oct 16 07:40:57 CEST 2020
Hello Roman,
Roman Gushchin <guro@fb.com> writes:
> Hi Richard!
>
>> SLAB objects which outlive their memcg are moved to their parent
>> memcg where they may be uncharged. However if they are moved to the
>> root memcg, uncharging will result in negative page counter values as
>> root has no page counters.
>>
>> To prevent this, we check whether we are about to uncharge the root
>> memcg and skip it if we are. Possibly instead; the obj_cgroups should
>> be removed from their slabs and any per cpu stocks instead of
>> reparenting them to root?
>
> It would be really complex. I think your fix is totally fine.
> We have similar checks in cancel_charge(), uncharge_batch(),
> mem_cgroup_swapout(), mem_cgroup_uncharge_swap() etc.
>
>
> Acked-by: Roman Gushchin <guro@fb.com>
>
> Thanks!
Great I will respin.
--
Thank you,
Richard.
More information about the ltp
mailing list