diff options
author | Alexei Starovoitov <ast@kernel.org> | 2025-02-22 05:44:25 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-02-27 20:39:37 +0300 |
commit | 01d37228d331047a0bbbd1026cec2ccabef6d88d (patch) | |
tree | 58cfefa3193c51ac16632143f9786d868a601f92 /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 8c57b687e8331eb80e302a2c528b18b966a9ac7a (diff) | |
download | linux-01d37228d331047a0bbbd1026cec2ccabef6d88d.tar.xz |
memcg: Use trylock to access memcg stock_lock.
Teach memcg to operate under trylock conditions when spinning locks
cannot be used.
localtry_trylock might fail and this would lead to charge cache bypass
if the calling context doesn't allow spinning (gfpflags_allow_spinning).
In those cases charge the memcg counter directly and fail early if
that is not possible. This might cause a pre-mature charge failing
but it will allow an opportunistic charging that is safe from
try_alloc_pages path.
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/r/20250222024427.30294-5-alexei.starovoitov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions