]> git.ipfire.org Git - thirdparty/linux.git/commit
slub: use N_NORMAL_MEMORY in can_free_to_pcs to handle remote frees
authorHao Li <hao.li@linux.dev>
Fri, 3 Apr 2026 07:37:36 +0000 (15:37 +0800)
committerVlastimil Babka (SUSE) <vbabka@kernel.org>
Tue, 7 Apr 2026 09:10:52 +0000 (11:10 +0200)
commit7f9bb84fdb5ee7621fcd6519cd14d3dc9aa75c5c
treec72aeaf21360cf26583683e5f176691c773efc4b
parente65d430111a5ba83598b03a4aca4799eb295eef1
slub: use N_NORMAL_MEMORY in can_free_to_pcs to handle remote frees

Memory hotplug now keeps N_NORMAL_MEMORY up to date correctly, so make
can_free_to_pcs() use it.

As a result, when freeing objects on memoryless nodes, or on nodes that
have memory but only in ZONE_MOVABLE, the objects can be freed to the
sheaf instead of going through the slow path.

Signed-off-by: Hao Li <hao.li@linux.dev>
Acked-by: Harry Yoo (Oracle) <harry@kernel.org>
Acked-by: David Rientjes <rientjes@google.com>
Link: https://patch.msgid.link/20260403073958.8722-1-hao.li@linux.dev
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
mm/slub.c