diff options
| author | Roman Gushchin <[email protected]> | 2023-10-19 15:53:44 -0700 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-10-25 16:47:11 -0700 |
| commit | e86828e5446d95676835679837d995dec188d2be (patch) | |
| tree | d74a46f7cf5209fe29e3337b3b280e3c728932b7 /tools/perf/scripts/python/flamegraph.py | |
| parent | 675d6c9b59e313ca2573c93e8fd87011a99bb8ce (diff) | |
mm: kmem: scoped objcg protection
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.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Roman Gushchin (Cruise) <[email protected]>
Tested-by: Naresh Kamboju <[email protected]>
Acked-by: Shakeel Butt <[email protected]>
Reviewed-by: Vlastimil Babka <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Dennis Zhou <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Muchun Song <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions