mm/memory_hotplug: don't read nid from struct page during hotplug
authorPavel Tatashin <[email protected]>
Thu, 5 Apr 2018 23:22:56 +0000 (16:22 -0700)
committerLinus Torvalds <[email protected]>
Fri, 6 Apr 2018 04:36:25 +0000 (21:36 -0700)
commitfc44f7f9231a73821fc858f5bc48883a9e78f6de
tree52d633c375d235c3fd059d885981e821f0ee31f4
parentb77eab7079d9e477489d2416cceda05d3c1cf21f
mm/memory_hotplug: don't read nid from struct page during hotplug

During memory hotplugging the probe routine will leave struct pages
uninitialized, the same as it is currently done during boot.  Therefore,
we do not want to access the inside of struct pages before
__init_single_page() is called during onlining.

Because during hotplug we know that pages in one memory block belong to
the same numa node, we can skip the checking.  We should keep checking
for the boot case.

[[email protected]: s/register_new_memory()/hotplug_memory_register()]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Pavel Tatashin <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Reviewed-by: Ingo Molnar <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Bharata B Rao <[email protected]>
Cc: Daniel Jordan <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Steven Sistare <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/base/memory.c
drivers/base/node.c
include/linux/memory.h
include/linux/node.h
mm/memory_hotplug.c