From 7bd077c8248b0c2df9680393bc7e3634af1a6d2a Mon Sep 17 00:00:00 2001 From: Kaixiong Yu Date: Thu, 22 May 2025 09:29:52 +0800 Subject: [PATCH] gfp: add __GFP_NOWARN when allocations with GFP_NOWAIT hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC9E4O -------------------------------- GFP_NOWAIT callers are always prepared for their allocations to fail because they fail so frequently. In such case, don't need to generate a warning. So, add __GFP_NOWARN to flag when allocations. Fixes:76e3125423ba ("mm/slub: Reduce memory consumption in extreme scenarios") Signed-off-by: Kaixiong Yu --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index d4e7e88df7ff..bcc00a95c368 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2782,7 +2782,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, */ if (unlikely(node != NUMA_NO_NODE && !(gfpflags & __GFP_THISNODE) && try_thisnode)) - pc_gfpflags = GFP_NOWAIT | __GFP_THISNODE; + pc_gfpflags = GFP_NOWAIT | __GFP_THISNODE | __GFP_NOWARN; freelist = new_slab_objects(s, pc_gfpflags, node, &c); -- Gitee