Re: [PATCH] slub: use N_NORMAL_MEMORY in can_free_to_pcs to handle remote frees

From: Vlastimil Babka (SUSE)

Date: Fri Apr 03 2026 - 14:14:22 EST


On 4/3/26 14:02, Harry Yoo (Oracle) wrote:
> On Fri, Apr 03, 2026 at 03:37:36PM +0800, Hao Li wrote:
>> 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@xxxxxxxxx>
>> ---
>
> Acked-by: Harry Yoo (Oracle) <harry@xxxxxxxxxx>
>
>> Hi Vlastimil, this patch depends on a prerequisite patch[1] from a few days
>> ago. I'm not sure how this should be handled.
>
>> I wonder if Andrew might put them in the same tree.

> But it also depends on the patch series
> "[PATCH 0/3] slab: support memoryless nodes with sheaves".
>
> So perhaps better send it to Linus after 7.1-rc1?

[1] is in mm-hotfixes so it should get to mainline before 7.0 final, so then
it's fine to add this to slab updates PR for 7.1-rc1

> Thanks!
>
>> [1] https://lore.kernel.org/linux-mm/20260330035941.518186-1-hao.li@xxxxxxxxx/
>