summaryrefslogtreecommitdiffstats
path: root/include/linux/node.h
diff options
context:
space:
mode:
authorPavel Tatashin <pasha.tatashin@oracle.com>2018-04-05 19:22:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-06 00:36:25 -0400
commitfc44f7f9231a73821fc858f5bc48883a9e78f6de (patch)
tree52d633c375d235c3fd059d885981e821f0ee31f4 /include/linux/node.h
parentb77eab7079d9e477489d2416cceda05d3c1cf21f (diff)
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. [pasha.tatashin@oracle.com: s/register_new_memory()/hotplug_memory_register()] Link: http://lkml.kernel.org/r/20180228030308.1116-6-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20180215165920.8570-6-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com> Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Cc: Daniel Jordan <daniel.m.jordan@oracle.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Steven Sistare <steven.sistare@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/node.h')
-rw-r--r--include/linux/node.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/node.h b/include/linux/node.h
index 4ece0fee0ffc..41f171861dcc 100644
--- a/include/linux/node.h
+++ b/include/linux/node.h
@@ -67,7 +67,7 @@ extern void unregister_one_node(int nid);
67extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); 67extern int register_cpu_under_node(unsigned int cpu, unsigned int nid);
68extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); 68extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid);
69extern int register_mem_sect_under_node(struct memory_block *mem_blk, 69extern int register_mem_sect_under_node(struct memory_block *mem_blk,
70 int nid); 70 int nid, bool check_nid);
71extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk, 71extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk,
72 unsigned long phys_index); 72 unsigned long phys_index);
73 73
@@ -97,7 +97,7 @@ static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
97 return 0; 97 return 0;
98} 98}
99static inline int register_mem_sect_under_node(struct memory_block *mem_blk, 99static inline int register_mem_sect_under_node(struct memory_block *mem_blk,
100 int nid) 100 int nid, bool check_nid)
101{ 101{
102 return 0; 102 return 0;
103} 103}