mm, slab: restore NUMA policy support for large kmalloc
authorVlastimil Babka <vbabka@suse.cz>
Mon, 2 Jun 2025 11:02:12 +0000 (13:02 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Tue, 17 Jun 2025 09:57:22 +0000 (11:57 +0200)
commite2d18cbf178775ad377ad88ee55e6e183c38d262
tree20f3d13056e43ce18cedecd0939faed1fa0a56d6
parente04c78d86a9699d136910cfc0bdcf01087e3267e
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.

Fixes: c4cab557521a ("mm/slab_common: cleanup kmalloc_large()")
Cc: <stable@vger.kernel.org>
Acked-by: Christoph Lameter (Ampere) <cl@gentwo.org>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slub.c