FAILED: patch "[PATCH] mm, slab: restore NUMA policy support for large kmalloc" failed to apply to 6.1-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x e2d18cbf178775ad377ad88ee55e6e183c38d262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025081818-skilled-timid-4660@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From e2d18cbf178775ad377ad88ee55e6e183c38d262 Mon Sep 17 00:00:00 2001
From: Vlastimil Babka <[email protected]>
Date: Mon, 2 Jun 2025 13:02:12 +0200
Subject: [PATCH] mm, slab: restore NUMA policy support for large kmalloc
The slab allocator observes the task's NUMA policy in various places such as allocating slab pages. Large kmalloc() allocations used to do that too, until an unintended change by c4cab557521a ("mm/slab_common:
cleanup kmalloc_large()") resulted in ignoring mempolicy and just preferring the local node. Restore the NUMA policy support.
mm/slub.c +6 -1
@@ -4269,7 +4269,12 @@ static void *___kmalloc_large_node(size_t size, gfp_t flags, int node) flags =kmalloc_fix_flags (flags); flags |= __GFP_COMP; - folio = (struct folio *)alloc_pages_node_noprof (node, flags, order); + +if (node ==NUMA_NO_NODE ) + folio = (struct folio *)alloc_pages_noprof (flags, order); +else + folio = (struct folio *)__alloc_pages_noprof (flags, order, node,NULL ); +if (folio) { ptr =folio_address (folio); lruvec_stat_mod_folio(folio, NR_SLAB_UNRECLAIMABLE_B,
Christoph Lameter (Ampere)
reviewerThe breakage was introduced in 6.1 So maybe the fix is not needed?
Quoted 62 lines · On Mon, 18 Aug 2025, [email protected] wrote:
The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkoutFETCH_HEAD
git cherry-pick -xe2d18cbf178775ad377ad88ee55e6e183c38d262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025081818-skilled-timid-4660@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
e2d18cbf178775ad377ad88ee55e6e183c38d262Mon Sep 17 00:00:00 2001From: Vlastimil Babka <[email protected]>
Date: Mon, 2 Jun 2025 13:02:12 +0200
Subject: [PATCH] mm, slab: restore NUMA policy support for large kmallocThe slab allocator observes the task's NUMA policy in various places such as allocating slab pages. Large
kmalloc()allocations used to do that too, until an unintended change byc4cab557521a("mm/slab_common:
cleanupkmalloc_large()") resulted in ignoring mempolicy and just preferring the local node. Restore the NUMA policy support.Fixes c4cab557521a ("mm/slab_common: cleanup kmalloc_large()")Cc <[email protected]>Acked-by Roman Gushchin <[email protected]>Reviewed-by Harry Yoo <[email protected]>Signed-off-by Vlastimil Babka <[email protected]>mm/slub.c +6
-1@@ -4269,7 +4269,12 @@ static void *___kmalloc_large_node(size_t size, gfp_t flags, int node) flags =kmalloc_fix_flags (flags); flags |= __GFP_COMP; - folio = (struct folio *)alloc_pages_node_noprof (node, flags, order); + +if (node ==NUMA_NO_NODE ) + folio = (struct folio *)alloc_pages_noprof (flags, order); +else + folio = (struct folio *)__alloc_pages_noprof (flags, order, node,NULL ); +if (folio) { ptr =folio_address (folio); lruvec_stat_mod_folio(folio, NR_SLAB_UNRECLAIMABLE_B,
Greg KH
maintainerQuoted 1 line · Christoph Lameter (Ampere)
The breakage was introduced in 6.1 So maybe the fix is not needed?
If it is broken in 6.1, then yes, it needs to be fixed in 6.1.y :)
thanks,
greg k-h