The patch titled Subject: mm/sparse.c: set section nid for hot-add memory has been added to the -mm tree. Its filename is mm-sparse-set-section-nid-for-hot-add-memory.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-sparse-set-section-nid-for-hot-add-memory.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-sparse-set-section-nid-for-hot-add-memory.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx> Subject: mm/sparse.c: set section nid for hot-add memory In case of NODE_NOT_IN_PAGE_FLAGS is set, we store section's node id in section_to_node_table[]. While for hot-add memory, this is missed. Without this information, page_to_nid() may not give the right node id. BTW, current online_pages works because it leverages nid in memory_block. But the granularity of node id should be mem_section wide. Link: http://lkml.kernel.org/r/20190618005537.18878-1-richardw.yang@xxxxxxxxxxxxxxx Signed-off-by: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx> Reviewed-by: Oscar Salvador <osalvador@xxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/sparse.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/sparse.c~mm-sparse-set-section-nid-for-hot-add-memory +++ a/mm/sparse.c @@ -731,6 +731,7 @@ int __meminit sparse_add_one_section(int */ page_init_poison(memmap, sizeof(struct page) * PAGES_PER_SECTION); + set_section_nid(section_nr, nid); section_mark_present(ms); sparse_init_one_section(ms, section_nr, memmap, usemap); _ Patches currently in -mm which might be from richardw.yang@xxxxxxxxxxxxxxx are mm-sparse-set-section-nid-for-hot-add-memory.patch