aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-03-01 17:51:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-02 12:34:39 -0500
commit20e6926dcbafa1b361f1c29d967688be14b6ca4b (patch)
treec5ea7011124c5c1a476c43484a6072702c178edc /include/linux
parent14cc0b55b70e297a4b5411733d58c6cdc2d7f1be (diff)
x86, ACPI, mm: Revert movablemem_map support
Tim found: WARNING: at arch/x86/kernel/smpboot.c:324 topology_sane.isra.2+0x6f/0x80() Hardware name: S2600CP sched: CPU #1's llc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency. smpboot: Booting Node 1, Processors #1 Modules linked in: Pid: 0, comm: swapper/1 Not tainted 3.9.0-0-generic #1 Call Trace: set_cpu_sibling_map+0x279/0x449 start_secondary+0x11d/0x1e5 Don Morris reproduced on a HP z620 workstation, and bisected it to commit e8d195525809 ("acpi, memory-hotplug: parse SRAT before memblock is ready") It turns out movable_map has some problems, and it breaks several things 1. numa_init is called several times, NOT just for srat. so those nodes_clear(numa_nodes_parsed) memset(&numa_meminfo, 0, sizeof(numa_meminfo)) can not be just removed. Need to consider sequence is: numaq, srat, amd, dummy. and make fall back path working. 2. simply split acpi_numa_init to early_parse_srat. a. that early_parse_srat is NOT called for ia64, so you break ia64. b. for (i = 0; i < MAX_LOCAL_APIC; i++) set_apicid_to_node(i, NUMA_NO_NODE) still left in numa_init. So it will just clear result from early_parse_srat. it should be moved before that.... c. it breaks ACPI_TABLE_OVERIDE...as the acpi table scan is moved early before override from INITRD is settled. 3. that patch TITLE is total misleading, there is NO x86 in the title, but it changes critical x86 code. It caused x86 guys did not pay attention to find the problem early. Those patches really should be routed via tip/x86/mm. 4. after that commit, following range can not use movable ram: a. real_mode code.... well..funny, legacy Node0 [0,1M) could be hot-removed? b. initrd... it will be freed after booting, so it could be on movable... c. crashkernel for kdump...: looks like we can not put kdump kernel above 4G anymore. d. init_mem_mapping: can not put page table high anymore. e. initmem_init: vmemmap can not be high local node anymore. That is not good. If node is hotplugable, the mem related range like page table and vmemmap could be on the that node without problem and should be on that node. We have workaround patch that could fix some problems, but some can not be fixed. So just remove that offending commit and related ones including: f7210e6c4ac7 ("mm/memblock.c: use CONFIG_HAVE_MEMBLOCK_NODE_MAP to protect movablecore_map in memblock_overlaps_region().") 01a178a94e8e ("acpi, memory-hotplug: support getting hotplug info from SRAT") 27168d38fa20 ("acpi, memory-hotplug: extend movablemem_map ranges to the end of node") e8d195525809 ("acpi, memory-hotplug: parse SRAT before memblock is ready") fb06bc8e5f42 ("page_alloc: bootmem limit with movablecore_map") 42f47e27e761 ("page_alloc: make movablemem_map have higher priority") 6981ec31146c ("page_alloc: introduce zone_movable_limit[] to keep movable limit for nodes") 34b71f1e04fc ("page_alloc: add movable_memmap kernel parameter") 4d59a75125d5 ("x86: get pg_data_t's memory from other node") Later we should have patches that will make sure kernel put page table and vmemmap on local node ram instead of push them down to node0. Also need to find way to put other kernel used ram to local node ram. Reported-by: Tim Gardner <tim.gardner@canonical.com> Reported-by: Don Morris <don.morris@hp.com> Bisected-by: Don Morris <don.morris@hp.com> Tested-by: Don Morris <don.morris@hp.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Thomas Renninger <trenn@suse.de> Cc: Tejun Heo <tj@kernel.org> Cc: Tang Chen <tangchen@cn.fujitsu.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h8
-rw-r--r--include/linux/memblock.h2
-rw-r--r--include/linux/mm.h18
3 files changed, 0 insertions, 28 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index f46cfd73a553..bcbdd7484e58 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -485,14 +485,6 @@ static inline bool acpi_driver_match_device(struct device *dev,
485 485
486#endif /* !CONFIG_ACPI */ 486#endif /* !CONFIG_ACPI */
487 487
488#ifdef CONFIG_ACPI_NUMA
489void __init early_parse_srat(void);
490#else
491static inline void early_parse_srat(void)
492{
493}
494#endif
495
496#ifdef CONFIG_ACPI 488#ifdef CONFIG_ACPI
497void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, 489void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
498 u32 pm1a_ctrl, u32 pm1b_ctrl)); 490 u32 pm1a_ctrl, u32 pm1b_ctrl));
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 3e5ecb2d790e..f388203db7e8 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -42,7 +42,6 @@ struct memblock {
42 42
43extern struct memblock memblock; 43extern struct memblock memblock;
44extern int memblock_debug; 44extern int memblock_debug;
45extern struct movablemem_map movablemem_map;
46 45
47#define memblock_dbg(fmt, ...) \ 46#define memblock_dbg(fmt, ...) \
48 if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) 47 if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
@@ -61,7 +60,6 @@ int memblock_reserve(phys_addr_t base, phys_addr_t size);
61void memblock_trim_memory(phys_addr_t align); 60void memblock_trim_memory(phys_addr_t align);
62 61
63#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP 62#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
64
65void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn, 63void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn,
66 unsigned long *out_end_pfn, int *out_nid); 64 unsigned long *out_end_pfn, int *out_nid);
67 65
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e7c3f9a0111a..1ede55f292c2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1333,24 +1333,6 @@ extern void free_bootmem_with_active_regions(int nid,
1333 unsigned long max_low_pfn); 1333 unsigned long max_low_pfn);
1334extern void sparse_memory_present_with_active_regions(int nid); 1334extern void sparse_memory_present_with_active_regions(int nid);
1335 1335
1336#define MOVABLEMEM_MAP_MAX MAX_NUMNODES
1337struct movablemem_entry {
1338 unsigned long start_pfn; /* start pfn of memory segment */
1339 unsigned long end_pfn; /* end pfn of memory segment (exclusive) */
1340};
1341
1342struct movablemem_map {
1343 bool acpi; /* true if using SRAT info */
1344 int nr_map;
1345 struct movablemem_entry map[MOVABLEMEM_MAP_MAX];
1346 nodemask_t numa_nodes_hotplug; /* on which nodes we specify memory */
1347 nodemask_t numa_nodes_kernel; /* on which nodes kernel resides in */
1348};
1349
1350extern void __init insert_movablemem_map(unsigned long start_pfn,
1351 unsigned long end_pfn);
1352extern int __init movablemem_map_overlap(unsigned long start_pfn,
1353 unsigned long end_pfn);
1354#endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */ 1336#endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
1355 1337
1356#if !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) && \ 1338#if !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) && \