The patch titled Fix copying of pgdat array on each node for ia64 memory hotplug has been removed from the -mm tree. Its filename is fix-copying-of-pgdat-array-on-each-node-for-ia64-memory-hotplug.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: Fix copying of pgdat array on each node for ia64 memory hotplug From: Yasunori Goto <y-goto@xxxxxxxxxxxxxx> Hello. I found a bug in memory hot-add code for ia64. IA64's code has copies of pgdat's array on each node to reduce memory access over crossing node. This array is used by NODE_DATA() macro. When new node is hot-added, this pgdat's array should be updated and copied on new node too. However, I used for_each_online_node() in scatter_node_data() to copy it. This meant its array is not copied on new node. Because initialization of structures for new node was halfway, so online_node_map couldn't be set at this time. To copy arrays on new node, I changed it to check value of pgdat_list[] which is source array of copies. I tested this patch with my Memory Hotadd emulation on Tiger4. This patch is for 2.6.17-git20. Signed-off-by: Yasunori Goto <y-goto@xxxxxxxxxxxxxx> Cc: "Luck, Tony" <tony.luck@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/ia64/mm/discontig.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff -puN arch/ia64/mm/discontig.c~fix-copying-of-pgdat-array-on-each-node-for-ia64-memory-hotplug arch/ia64/mm/discontig.c --- a/arch/ia64/mm/discontig.c~fix-copying-of-pgdat-array-on-each-node-for-ia64-memory-hotplug +++ a/arch/ia64/mm/discontig.c @@ -313,9 +313,19 @@ static void __meminit scatter_node_data( pg_data_t **dst; int node; - for_each_online_node(node) { - dst = LOCAL_DATA_ADDR(pgdat_list[node])->pg_data_ptrs; - memcpy(dst, pgdat_list, sizeof(pgdat_list)); + /* + * for_each_online_node() can't be used at here. + * node_online_map is not set for hot-added nodes at this time, + * because we are halfway through initialization of the new node's + * structures. If for_each_online_node() is used, a new node's + * pg_data_ptrs will be not initialized. Insted of using it, + * pgdat_list[] is checked. + */ + for_each_node(node) { + if (pgdat_list[node]) { + dst = LOCAL_DATA_ADDR(pgdat_list[node])->pg_data_ptrs; + memcpy(dst, pgdat_list, sizeof(pgdat_list)); + } } } _ Patches currently in -mm which might be from y-goto@xxxxxxxxxxxxxx are - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html