diff options
| author | Alexei Starovoitov <[email protected]> | 2025-02-22 02:44:25 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2025-02-27 17:39:37 +0000 |
| commit | 01d37228d331047a0bbbd1026cec2ccabef6d88d (patch) | |
| tree | 58cfefa3193c51ac16632143f9786d868a601f92 /samples/rust/rust_driver_pci.rs | |
| parent | mm, bpf: Introduce free_pages_nolock() (diff) | |
| download | kernel-01d37228d331047a0bbbd1026cec2ccabef6d88d.tar.gz kernel-01d37228d331047a0bbbd1026cec2ccabef6d88d.zip | |
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 <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Acked-by: Shakeel Butt <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'samples/rust/rust_driver_pci.rs')
0 files changed, 0 insertions, 0 deletions
