]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/slab: pass __GFP_NOWARN to refill_sheaf() if fallback is available
authorHarry Yoo <harry.yoo@oracle.com>
Mon, 23 Feb 2026 13:33:22 +0000 (22:33 +0900)
committerVlastimil Babka (SUSE) <vbabka@kernel.org>
Thu, 26 Feb 2026 16:30:06 +0000 (17:30 +0100)
commit021ca6b670bebebc409d43845efcfe8c11c1dd54
treeded2d103ed6a8a9be34596b95a1a3c77035eb277
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
mm/slab: pass __GFP_NOWARN to refill_sheaf() if fallback is available

When refill_sheaf() is called, failing to refill the sheaf doesn't
necessarily mean the allocation will fail because a fallback path
might be available and serve the allocation request.

Suppress spurious warnings by passing __GFP_NOWARN along with
__GFP_NOMEMALLOC whenever a fallback path is available.

When the caller is alloc_full_sheaf() or __pcs_replace_empty_main(),
the kernel always falls back to the slowpath (__slab_alloc_node()).
For __prefill_sheaf_pfmemalloc(), the fallback path is available
only when gfp_pfmemalloc_allowed() returns true.

Reported-and-tested-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Closes: https://lore.kernel.org/linux-mm/aZt2-oS9lkmwT7Ch@debian.local
Fixes: 1ce20c28eafd ("slab: handle pfmemalloc slabs properly with sheaves")
Link: https://lore.kernel.org/linux-mm/aZwSreGj9-HHdD-j@hyeyoo
Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
Link: https://patch.msgid.link/20260223133322.16705-1-harry.yoo@oracle.com
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
mm/slub.c