Messages in this thread | | | From | Richard Palethorpe <> | Subject | Re: [RFC PATCH] mm: memcg/slab: Stop reparented obj_cgroups from charging root | Date | Fri, 16 Oct 2020 06:40:57 +0100 |
| |
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.
| |