On 10/17/23 00:18, Roman Gushchin wrote: > Keep a reference to the original objcg object for the entire life > of a memcg structure. > > This allows to simplify the synchronization on the kernel memory > allocation paths: pinning a (live) memcg will also pin the > corresponding objcg. > > The memory overhead of this change is minimal because object cgroups > usually outlive their corresponding memory cgroups even without this > change, so it's only an additional pointer per memcg. > > Signed-off-by: Roman Gushchin (Cruise) <roman.gushchin@xxxxxxxxx> > Tested-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx> > Acked-by: Shakeel Butt <shakeelb@xxxxxxxxxx> Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>