Re: [patch] slab: add memory hotplug support
From: David Rientjes
Date: Tue Mar 02 2010 - 21:39:37 EST
On Wed, 3 Mar 2010, KAMEZAWA Hiroyuki wrote:
> At node hot-add
> * pgdat is allocated from other node (because we have no memory for "nid")
> * memmap for the first section (and possiby others) will be allocated from
> other nodes.
> * Once a section for the node is onlined, any memory can be allocated localy.
Correct, and the struct kmem_list3 is also alloacted from other nodes with
> (Allocating memory from local node requires some new implementation as
> bootmem allocater, we didn't that.)
> Before this patch, slab's control layer is allocated by cpuhotplug.
> So, at least keeping this order,
> memory online -> cpu online
> slab's control layer is allocated from local node.
> When node-hotadd is done in this order
> cpu online -> memory online
> kmalloc_node() will allocate memory from other node via fallback.
> After this patch, slab's control layer is allocated by memory hotplug.
> Then, in any order, slab's control will be allocated via fallback routine.
Again, this addresses memory hotplug that requires a new node to be
onlined that do not have corresponding cpus that are being onlined. On
x86, these represent ACPI_SRAT_MEM_HOT_PLUGGABLE regions that are onlined
either by the acpi hotplug or done manually with CONFIG_ARCH_MEMORY_PROBE.
On other architectures such as powerpc, this is done in different ways.
All of this is spelled out in the changelog for the patch.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/