All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/sparse: set section nid for hot-add memory
@ 2019-06-16  2:35 Wei Yang
  2019-06-17  4:23 ` Anshuman Khandual
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wei Yang @ 2019-06-16  2:35 UTC (permalink / raw)
  To: linux-mm; +Cc: akpm, pasha.tatashin, osalvador, Wei Yang

section_to_node_table[] is used to record section's node id, which is
used in page_to_nid(). While for hot-add memory, this is missed.

BTW, current online_pages works because it leverages nid in memory_block.
But the granularity of node id should be mem_section wide.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 mm/sparse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/sparse.c b/mm/sparse.c
index fd13166949b5..3ba8f843cb7a 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -735,6 +735,7 @@ int __meminit sparse_add_one_section(int nid, unsigned long start_pfn,
 	 */
 	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);
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-18  0:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-16  2:35 [PATCH] mm/sparse: set section nid for hot-add memory Wei Yang
2019-06-17  4:23 ` Anshuman Khandual
2019-06-17  8:46   ` Wei Yang
2019-06-17 13:13 ` David Hildenbrand
2019-06-18  0:36   ` Wei Yang
2019-06-17 15:43 ` Oscar Salvador
2019-06-18  0:45   ` Wei Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.