Re: [PATCH v5 28/36] mm: add NODE_PRIVATE_CAP_HOTUNPLUG for opted-in private nodes
From: Gregory Price
Date: Wed Jul 22 2026 - 10:16:30 EST
On Mon, Jul 20, 2026 at 03:34:22PM -0400, Gregory Price wrote:
> Add CAP_HOTUNPLUG, which allows memory_hotplug to migrate a private
> node's folios for the purpose of hotunplugging memory.
>
> Without this, hotunplug fails if any folio on the node is allocated.
>
> Add node_allows_hotunplug() - which returns true for any normal node
> and private nodes with CAP_HOTUNPLUG.
>
> Signed-off-by: Gregory Price <gourry@xxxxxxxxxx>
after this question:
https://lore.kernel.org/linux-mm/al-pkvmgIxGu3LzM@gourry-fedora-PF4VCD3F/T/#m5b8166212a276fece2380f2dd03d6864375a576b
and some off-list feedback about limiting initial cap bits to active
use cases, I realized that this CAP bit can be entirely eliminated.
hotplug notifier callbacks already allow a driver to prevent memory
block state transitions - so that control already exists.
v6 will remove both the filtering here and the cap bit.
~Gregory