[RFC PATCH 8/8] HACK: mm: memory_hotplug: Drop memblock_phys_free() call in try_remove_memory()

Jonathan Cameron Jonathan.Cameron at huawei.com
Wed May 29 10:12:36 PDT 2024


I'm not sure what this is balancing, but it if is necessary then the reserved
memblock approach can't be used to stash NUMA node assignments as after the
first add / remove cycle the entry is dropped so not available if memory is
re-added at the same HPA.

This patch is here to hopefully spur comments on what this is there for!

Signed-off-by: Jonathan Cameron <Jonathan.Cameron at huawei.com>
---
 mm/memory_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 431b1f6753c0..3d8dd4749dfc 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -2284,7 +2284,7 @@ static int __ref try_remove_memory(u64 start, u64 size)
 	}
 
 	if (IS_ENABLED(CONFIG_ARCH_KEEP_MEMBLOCK)) {
-		memblock_phys_free(start, size);
+		//		memblock_phys_free(start, size);
 		memblock_remove(start, size);
 	}
 
-- 
2.39.2




More information about the linux-arm-kernel mailing list