kernel_optimize_test/arch/x86/mm
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
..
kmemcheck arch/x86/mm/kmemcheck/kmemcheck.c: use kstrtoint() instead of sscanf() 2014-04-08 16:48:52 -07:00
amdtopology.c
dump_pagetables.c x86, ptdump: Add the functionality to dump an arbitrary pagetable 2014-03-04 16:16:17 +00:00
extable.c
fault.c Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-03-31 12:26:05 -07:00
gup.c mm: dump page when hitting a VM_BUG_ON using VM_BUG_ON_PAGE 2014-01-23 16:36:50 -08:00
highmem_32.c
hugetlbpage.c hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
init_32.c memblock: make memblock_set_node() support different memblock_type 2014-01-21 16:19:44 -08:00
init_64.c x86, mm: probe memory block size for generic x86 64bit 2014-06-04 16:53:55 -07:00
init.c
iomap_32.c
ioremap.c x86, ioremap: Speed up check for RAM pages 2014-05-02 11:52:26 -07:00
kmmio.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
Makefile
memtest.c x86/mm: memblock: switch to use NUMA_NO_NODE 2014-01-21 16:19:47 -08:00
mm_internal.h
mmap.c
mmio-mod.c
numa_32.c x86: Fix the initialization of physnode_map 2014-02-01 22:15:51 -08:00
numa_64.c
numa_emulation.c
numa_internal.h
numa.c x86, platforms: Remove NUMAQ 2014-02-27 08:07:39 -08:00
pageattr-test.c x86: define _PAGE_NUMA by reusing software bits on the PMD and PTE levels 2014-06-04 16:53:55 -07:00
pageattr.c Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-03-31 12:26:05 -07:00
pat_internal.h
pat_rbtree.c
pat.c
pf_in.c
pf_in.h
pgtable_32.c x86: use generic early_ioremap 2014-04-07 16:36:15 -07:00
pgtable.c x86/mm: In the PTE swapout page reclaim case clear the accessed bit instead of flushing the TLB 2014-04-16 08:57:08 +02:00
physaddr.c
physaddr.h
setup_nx.c
srat.c x86/mm: Avoid duplicated pxm_to_node() calls 2014-02-09 15:32:31 +01:00
testmmiotrace.c
tlb.c x86/mm: Eliminate redundant page table walk during TLB range flushing 2014-01-25 09:10:43 +01:00