mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
mm, slab: restore NUMA policy support for large kmalloc
commite2d18cbf17
upstream. 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 byc4cab55752
("mm/slab_common: cleanup kmalloc_large()") resulted in ignoring mempolicy and just preferring the local node. Restore the NUMA policy support. Fixes:c4cab55752
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f26e537666
commit
c725d61627
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user