Messages in this thread | | | Date | Wed, 18 Oct 2023 16:04:59 +0200 | Subject | Re: [PATCH v3 4/5] mm: kmem: scoped objcg protection | From | Vlastimil Babka <> |
| |
On 10/17/23 00:18, Roman Gushchin wrote: > Switch to a scope-based protection of the objcg pointer on slab/kmem > allocation paths. Instead of using the get_() semantics in the > pre-allocation hook and put the reference afterwards, let's rely > on the fact that objcg is pinned by the scope. > > It's possible because: > 1) if the objcg is received from the current task struct, the task is > keeping a reference to the objcg. > 2) if the objcg is received from an active memcg (remote charging), > the memcg is pinned by the scope and has a reference to the > corresponding objcg. > > Signed-off-by: Roman Gushchin (Cruise) <roman.gushchin@linux.dev> > Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org> > Acked-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
| |