remarkable-linux/arch
Tang Chen 01a178a94e acpi, memory-hotplug: support getting hotplug info from SRAT
We now provide an option for users who don't want to specify physical
memory address in kernel commandline.

         /*
          * For movablemem_map=acpi:
          *
          * SRAT:                |_____| |_____| |_________| |_________| ......
          * node id:                0       1         1           2
          * hotpluggable:           n       y         y           n
          * movablemem_map:              |_____| |_________|
          *
          * Using movablemem_map, we can prevent memblock from allocating memory
          * on ZONE_MOVABLE at boot time.
          */

So user just specify movablemem_map=acpi, and the kernel will use
hotpluggable info in SRAT to determine which memory ranges should be set
as ZONE_MOVABLE.

If all the memory ranges in SRAT is hotpluggable, then no memory can be
used by kernel.  But before parsing SRAT, memblock has already reserve
some memory ranges for other purposes, such as for kernel image, and so
on.  We cannot prevent kernel from using these memory.  So we need to
exclude these ranges even if these memory is hotpluggable.

Furthermore, there could be several memory ranges in the single node
which the kernel resides in.  We may skip one range that have memory
reserved by memblock, but if the rest of memory is too small, then the
kernel will fail to boot.  So, make the whole node which the kernel
resides in un-hotpluggable.  Then the kernel has enough memory to use.

NOTE: Using this way will cause NUMA performance down because the
      whole node will be set as ZONE_MOVABLE, and kernel cannot use memory
      on it.  If users don't want to lose NUMA performance, just don't use
      it.

[akpm@linux-foundation.org: fix warning]
[akpm@linux-foundation.org: use strcmp()]
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Wu Jianguo <wujianguo@huawei.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Len Brown <lenb@kernel.org>
Cc: "Brown, Len" <len.brown@intel.com>
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
blackfin arm-soc: cleanups 2013-02-21 14:58:40 -08:00
c6x
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
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 acpi, memory-hotplug: support getting hotplug info from SRAT 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