Re: [RFC PATCH] memory,memory_hotplug: allow restricting memory blocks to zone movable

From: David Hildenbrand (Red Hat)

Date: Tue Jan 06 2026 - 10:24:27 EST


+/*
+ * Restrict hotplugged memory blocks to ZONE_MOVABLE only.
+ *
+ * During offlining of hotplugged memory which was originally onlined
+ * as ZONE_MOVABLE, userland services may detect blocks going offline
+ * and automatically re-online them into ZONE_NORMAL or lower. When
+ * this happens it may become permanently incapable of being removed.

If it's really only that, we could also look into simply making a re-online without a specific mode ("online") to use the previous mode.

We could glue that to the "contig-zones" policy only, to not affect "auto-movable".

That is, remember the zone to which it was previously onlined, and then simply re-online to that one.

--
Cheers

David