diff options
author | Shakeel Butt <shakeel.butt@linux.dev> | 2025-03-13 08:48:12 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-03-22 08:03:11 +0300 |
commit | 20d6c17252282c3af261d1cde8e34def1b2458c8 (patch) | |
tree | 30e14178be86238c745cdc59c859c7fd6748e3eb /tools/perf/scripts/python/export-to-sqlite.py | |
parent | b4f65dbdf87812056c224fd8d2c66318b2140ab5 (diff) | |
download | linux-20d6c17252282c3af261d1cde8e34def1b2458c8.tar.xz |
memcg: avoid refill_stock for root memcg
We never charge the page counters of root memcg, so there is no need to
put root memcg in the memcg stock. At the moment, refill_stock() can be
called from try_charge_memcg(), obj_cgroup_uncharge_pages() and
mem_cgroup_uncharge_skmem().
The try_charge_memcg() and mem_cgroup_uncharge_skmem() are never called
with root memcg, so those are fine. However obj_cgroup_uncharge_pages()
can potentially call refill_stock() with root memcg if the objcg object
has been reparented over to the root memcg. Let's just avoid
refill_stock() from obj_cgroup_uncharge_pages() for root memcg.
Link: https://lkml.kernel.org/r/20250313054812.2185900-1-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Michal Hocko <mhockoc@suse.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions