OpenCloudOS-Kernel/arch
Tony Luck fc6daaf931 mm/memblock: add extra "flags" to memblock to allow selection of memory based on attribute
Some high end Intel Xeon systems report uncorrectable memory errors as a
recoverable machine check.  Linux has included code for some time to
process these and just signal the affected processes (or even recover
completely if the error was in a read only page that can be replaced by
reading from disk).

But we have no recovery path for errors encountered during kernel code
execution.  Except for some very specific cases were are unlikely to ever
be able to recover.

Enter memory mirroring. Actually 3rd generation of memory mirroing.

Gen1: All memory is mirrored
	Pro: No s/w enabling - h/w just gets good data from other side of the
	     mirror
	Con: Halves effective memory capacity available to OS/applications

Gen2: Partial memory mirror - just mirror memory begind some memory controllers
	Pro: Keep more of the capacity
	Con: Nightmare to enable. Have to choose between allocating from
	     mirrored memory for safety vs. NUMA local memory for performance

Gen3: Address range partial memory mirror - some mirror on each memory
      controller
	Pro: Can tune the amount of mirror and keep NUMA performance
	Con: I have to write memory management code to implement

The current plan is just to use mirrored memory for kernel allocations.
This has been broken into two phases:

1) This patch series - find the mirrored memory, use it for boot time
   allocations

2) Wade into mm/page_alloc.c and define a ZONE_MIRROR to pick up the
   unused mirrored memory from mm/memblock.c and only give it out to
   select kernel allocations (this is still being scoped because
   page_alloc.c is scary).

This patch (of 3):

Add extra "flags" to memblock to allow selection of memory based on
attribute.  No functional changes

Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Hanjun Guo <guohanjun@huawei.com>
Cc: Xiexiuqi <xiexiuqi@huawei.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-24 17:49:44 -07:00
..
alpha mm: new mm hook framework 2015-06-24 17:49:41 -07:00
arc mm: new mm hook framework 2015-06-24 17:49:41 -07:00
arm mm/hugetlb: reduce arch dependent code about hugetlb_prefault_arch_hook 2015-06-24 17:49:41 -07:00
arm64 mm/hugetlb: reduce arch dependent code about hugetlb_prefault_arch_hook 2015-06-24 17:49:41 -07:00
avr32 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
blackfin mm: new mm hook framework 2015-06-24 17:49:41 -07:00
c6x mm: new mm hook framework 2015-06-24 17:49:41 -07:00
cris mm: new mm hook framework 2015-06-24 17:49:41 -07:00
frv mm: new mm hook framework 2015-06-24 17:49:41 -07:00
hexagon mm: new mm hook framework 2015-06-24 17:49:41 -07:00
ia64 mm/hugetlb: reduce arch dependent code about hugetlb_prefault_arch_hook 2015-06-24 17:49:41 -07:00
m32r mm: new mm hook framework 2015-06-24 17:49:41 -07:00
m68k mm: new mm hook framework 2015-06-24 17:49:41 -07:00
metag mm/hugetlb: reduce arch dependent code about hugetlb_prefault_arch_hook 2015-06-24 17:49:41 -07:00
microblaze mm: new mm hook framework 2015-06-24 17:49:41 -07:00
mips mm: clarify that the function operates on hugepage pte 2015-06-24 17:49:44 -07:00
mn10300 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
nios2 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
openrisc mm: new mm hook framework 2015-06-24 17:49:41 -07:00
parisc mm: new mm hook framework 2015-06-24 17:49:41 -07:00
powerpc mm: clarify that the function operates on hugepage pte 2015-06-24 17:49:44 -07:00
s390 mm/memblock: add extra "flags" to memblock to allow selection of memory based on attribute 2015-06-24 17:49:44 -07:00
score mm: new mm hook framework 2015-06-24 17:49:41 -07:00
sh mm/hugetlb: reduce arch dependent code about hugetlb_prefault_arch_hook 2015-06-24 17:49:41 -07:00
sparc mm/memblock: add extra "flags" to memblock to allow selection of memory based on attribute 2015-06-24 17:49:44 -07:00
tile mm: clarify that the function operates on hugepage pte 2015-06-24 17:49:44 -07:00
um mm: new mm hook framework 2015-06-24 17:49:41 -07:00
unicore32 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
x86 mm/memblock: add extra "flags" to memblock to allow selection of memory based on attribute 2015-06-24 17:49:44 -07:00
xtensa mm: new mm hook framework 2015-06-24 17:49:41 -07:00
.gitignore
Kconfig powerpc updates for 4.1 2015-04-16 13:53:32 -05:00