Why prevent boot memory to be hot-removed on arm64?
Huang, Ying
ying.huang at linux.alibaba.com
Mon Jul 28 23:22:50 PDT 2025
Hi, Anshuman,
When I read memory hotplug code on arm64, I found that a memory notifier
(prevent_bootmem_remove_notifier()) is used to prevent the boot memory
to be hot-removed on arm64. I understand that some memory (for example
the boot memory) shouldn't be hot-removed on some platforms. However,
after checking the code, I found that the memory can only be hot-removed
via ACPI (acpi_memory_device_remove()), CXL/NVDIMM
(dev_dax_kmem_remove()), or virtio mem (virtio_mem_remove_memory).
IIUC, CXL/NVDIMM or virtio mem shouldn't be boot memory, and ACPI memory
hot-remove shouldn't be setup by the firmware if some memory ranges
shouldn't be hot-removed. If so, the boot memory cannot be hot-removed
accidentally, prevent_bootmem_remove_notifier() just makes the boot
memory can not be offlined.
Or I missed something?
---
Best Regards,
Huang, Ying
More information about the linux-arm-kernel
mailing list