Re: [PATCH] mm/memory_hotplug: factor out node_is_memoryless()
From: David Hildenbrand (Arm)
Date: Mon Sep 07 2026 - 11:31:31 EST
On 9/2/26 21:55, Gregory Price wrote:
> A memoryless node neither spans present pages (populated or ZONE_DEVICE)
> nor has an offline-but-added memory block still linked to it in sysfs.
>
> try_offline_node() presently open-codes this memoryless check.
>
> Pull that into a node_is_memoryless() helper and pull the existing
> check_no_memblock_for_node_cb() helper ahead of the add/online path
> so it's clearer what is happening here.
>
> No functional change.
>
> Signed-off-by: Gregory Price <gourry@xxxxxxxxxx>
> ---
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David