On Fri, 2013-10-04 at 09:58 +0800, Zhang Yanfei wrote: > From: Tang Chen <tangchen@xxxxxxxxxxxxxx> > > The Linux kernel cannot migrate pages used by the kernel. As a result, kernel > pages cannot be hot-removed. So we cannot allocate hotpluggable memory for > the kernel. > > ACPI SRAT (System Resource Affinity Table) contains the memory hotplug info. > But before SRAT is parsed, memblock has already started to allocate memory > for the kernel. So we need to prevent memblock from doing this. > > In a memory hotplug system, any numa node the kernel resides in should > be unhotpluggable. And for a modern server, each node could have at least > 16GB memory. So memory around the kernel image is highly likely unhotpluggable. > > So the basic idea is: Allocate memory from the end of the kernel image and > to the higher memory. Since memory allocation before SRAT is parsed won't > be too much, it could highly likely be in the same node with kernel image. > > The current memblock can only allocate memory top-down. So this patch introduces > a new bottom-up allocation mode to allocate memory bottom-up. And later > when we use this allocation direction to allocate memory, we will limit > the start address above the kernel. > > Signed-off-by: Tang Chen <tangchen@xxxxxxxxxxxxxx> > Signed-off-by: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx> Thanks for the update. Acked-by: Toshi Kani <toshi.kani@xxxxxx> -Toshi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>