aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/mutex.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <[email protected]>2025-05-06 11:25:08 +0000
committerAndrew Morton <[email protected]>2025-05-12 00:26:07 +0000
commit23fa022a07555a9cd2dcfe827c769a89c4c2e21e (patch)
treecd907fc4082c11408862647b48c6573ac15d69f9 /rust/helpers/mutex.c
parentMAINTAINERS: add mm GUP section (diff)
downloadkernel-23fa022a07555a9cd2dcfe827c769a89c4c2e21e.tar.gz
kernel-23fa022a07555a9cd2dcfe827c769a89c4c2e21e.zip
mm/page_alloc: ensure try_alloc_pages() plays well with unaccepted memory
try_alloc_pages() will not attempt to allocate memory if the system has *any* unaccepted memory. Memory is accepted as needed and can remain in the system indefinitely, causing the interface to always fail. Rather than immediately giving up, attempt to use already accepted memory on free lists. Pass 'alloc_flags' to cond_accept_memory() and do not accept new memory for ALLOC_TRYLOCK requests. Found via code inspection - only BPF uses this at present and the runtime effects are unclear. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kirill A. Shutemov <[email protected]> Fixes: 97769a53f117 ("mm, bpf: Introduce try_alloc_pages() for opportunistic page allocation") Cc: Alexei Starovoitov <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Brendan Jackman <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions