On Tue, 03 Dec 2013 10:28:13 +0800 Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx> wrote: > From: Tang Chen <tangchen@xxxxxxxxxxxxxx> > > At very early time, the kernel have to use some memory such as > loading the kernel image. We cannot prevent this anyway. So any > node the kernel resides in should be un-hotpluggable. > > @@ -555,6 +563,30 @@ static void __init numa_init_array(void) > } > } > > +static void __init numa_clear_kernel_node_hotplug(void) > +{ > + int i, nid; > + nodemask_t numa_kernel_nodes; > + unsigned long start, end; > + struct memblock_type *type = &memblock.reserved; > + > + /* Mark all kernel nodes. */ > + for (i = 0; i < type->cnt; i++) > + node_set(type->regions[i].nid, numa_kernel_nodes); > + > + /* Clear MEMBLOCK_HOTPLUG flag for memory in kernel nodes. */ > + for (i = 0; i < numa_meminfo.nr_blks; i++) { > + nid = numa_meminfo.blk[i].nid; > + if (!node_isset(nid, numa_kernel_nodes)) > + continue; > + > + start = numa_meminfo.blk[i].start; > + end = numa_meminfo.blk[i].end; > + > + memblock_clear_hotplug(start, end - start); > + } > +} Shouldn't numa_kernel_nodes be initialized? -- 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>