linux/arch
Yinghai Lu 982792c782 x86, mm: probe memory block size for generic x86 64bit
On system with 2TiB ram, current x86_64 have 128M as section size, and
one memory_block only include one section.  So will have 16400 entries
under /sys/devices/system/memory/.

Current code try to use block id to find block pointer in /sys for any
section, and reuse that block pointer.  that finding will take some time
even after commit 7c243c7168 ("mm: speedup in __early_pfn_to_nid")
that will skip the search in that case during booting up.

So solution could be increase block size just like SGI UV system did.
(harded code to 2g).

This patch is trying to probe the block size to make it match mmio remap
size.  for example, Intel Nehalem later system will have memory range [0,
TOML), [4g, TOMH].  If the memory hole is 2g and total is 128g, TOM will
be 2g, and TOM2 will be 130g.

We could use 2g as block size instead of default 128M.  That will reduce
number of entries in /sys/devices/system/memory/

On system 6TiB system will reduce boot time by 35 seconds.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
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>
2014-06-04 16:53:55 -07:00
..
alpha Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 14:00:15 -07:00
arc DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
arm hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
arm64 hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
avr32 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
blackfin Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
c6x DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
cris Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
frv Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
hexagon
ia64 hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
m32r
m68k Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
metag hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
microblaze DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
mips hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
mn10300 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
openrisc DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
parisc Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
powerpc x86: define _PAGE_NUMA by reusing software bits on the PMD and PTE levels 2014-06-04 16:53:55 -07:00
s390 hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
score
sh sh: Replace __get_cpu_var uses 2014-06-04 16:53:52 -07:00
sparc hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
tile hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
um
unicore32 arch/unicore32/mm/ioremap.c: return NULL on invalid pfn 2014-06-04 16:53:53 -07:00
x86 x86, mm: probe memory block size for generic x86 64bit 2014-06-04 16:53:55 -07:00
xtensa DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
.gitignore
Kconfig