diff options
| author | Guopeng Zhang <zhangguopeng@kylinos.cn> | 2026-07-13 17:03:04 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-08-06 18:56:55 -0700 |
| commit | afe9ae3fda96d1ccfd28f7b0c1f68527a570ccd4 (patch) | |
| tree | f31b9345f689b319219f57a6a9534723a80a2587 /tools/perf/scripts/python/task-analyzer.py | |
| parent | 219a53f6c84bafd3871afc5b007e777112074e51 (diff) | |
mm: memcontrol: factor out memcg kmem uncharge sequence
The kmem-uncharge sequence (mod_memcg_state(MEMCG_KMEM) +
memcg1_account_kmem + conditional memcg_uncharge) is duplicated verbatim
in obj_cgroup_release() and drain_obj_stock_slot(). Factor it into a
small memcg_uncharge_kmem() helper. The reference get/put stays at the
call sites, as they differ.
No functional change.
Link: https://lore.kernel.org/20260713090304.3015329-1-guopeng.zhang@linux.dev
Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Acked-by: Tao Cui <cuitao@kylinos.cn>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
