linux/arch
Yasuaki Ishimatsu 4d59a75125 x86: get pg_data_t's memory from other node
During the implementation of SRAT support, we met a problem.  In
setup_arch(), we have the following call series:

 1) memblock is ready;
 2) some functions use memblock to allocate memory;
 3) parse ACPI tables, such as SRAT.

Before 3), we don't know which memory is hotpluggable, and as a result,
we cannot prevent memblock from allocating hotpluggable memory.  So, in
2), there could be some hotpluggable memory allocated by memblock.

Now, we are trying to parse SRAT earlier, before memblock is ready.  But
I think we need more investigation on this topic.  So in this v5, I
dropped all the SRAT support, and v5 is just the same as v3, and it is
based on 3.8-rc3.

As we planned, we will support getting info from SRAT without users'
participation at last.  And we will post another patch-set to do so.

And also, I think for now, we can add this boot option as the first step
of supporting movable node.  Since Linux cannot migrate the direct
mapped pages, the only way for now is to limit the whole node containing
only movable memory.

Using SRAT is one way.  But even if we can use SRAT, users still need an
interface to enable/disable this functionality if they don't want to
loose their NUMA performance.  So I think, a user interface is always
needed.

For now, users can disable this functionality by not specifying the boot
option.  Later, we will post SRAT support, and add another option value
"movablecore_map=acpi" to using SRAT.

This patch:

If system can create movable node which all memory of the node is
allocated as ZONE_MOVABLE, setup_node_data() cannot allocate memory for
the node's pg_data_t.  So, use memblock_alloc_try_nid() instead of
memblock_alloc_nid() to retry when the first allocation fails.

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Wu Jianguo <wujianguo@huawei.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-23 17:50:14 -08:00
..
alpha Merge branch 'akpm' (incoming from Andrew) 2013-02-21 17:38:49 -08:00
arm Merge branch 'akpm' (incoming from Andrew) 2013-02-21 17:38:49 -08:00
arm64 memory-hotplug: remove memmap of sparse-vmemmap 2013-02-23 17:50:12 -08:00
avr32 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
blackfin arm-soc: cleanups 2013-02-21 14:58:40 -08:00
c6x c6x: Provide dummy dma_mmap_coherent() and dma_get_sgtable() 2013-01-29 08:11:14 +01:00
cris Merge branch 'akpm' (incoming from Andrew) 2013-02-21 17:38:49 -08:00
frv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-02-20 18:58:50 -08:00
h8300 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-02-21 17:40:58 -08:00
hexagon arch Kconfig: Remove references to IRQ_PER_CPU 2013-02-04 18:53:20 +01:00
ia64 memory-hotplug: remove memmap of sparse-vmemmap 2013-02-23 17:50:12 -08:00
m32r arm-soc: cleanups 2013-02-21 14:58:40 -08:00
m68k arm-soc: cleanups 2013-02-21 14:58:40 -08:00
microblaze Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
mips Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-21 18:06:55 -08:00
mn10300 Merge branch 'akpm' (incoming from Andrew) 2013-02-21 17:38:49 -08:00
openrisc openrisc idle: delete pm_idle 2013-02-17 23:37:08 -05:00
parisc tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
powerpc memory-hotplug: remove memmap of sparse-vmemmap 2013-02-23 17:50:12 -08:00
s390 memory-hotplug: remove memmap of sparse-vmemmap 2013-02-23 17:50:12 -08:00
score
sh memory-hotplug: introduce new arch_remove_memory() for removing page table 2013-02-23 17:50:12 -08:00
sparc memory-hotplug: remove memmap of sparse-vmemmap 2013-02-23 17:50:12 -08:00
tile memory-hotplug: introduce new arch_remove_memory() for removing page table 2013-02-23 17:50:12 -08:00
um tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
unicore32 unicore32 idle: delete stray pm_idle comment 2013-02-17 23:37:08 -05:00
x86 x86: get pg_data_t's memory from other node 2013-02-23 17:50:14 -08:00
xtensa Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-02-21 17:40:58 -08:00
.gitignore
Kconfig kprobes/x86: Move ftrace-based kprobe code into kprobes-ftrace.c 2013-01-21 13:22:36 -05:00