linux/arch/x86/mm
Christoph Lameter b263295dbf x86: 64-bit, make sparsemem vmemmap the only memory model
Use sparsemem as the only memory model for UP, SMP and NUMA.  Measurements
indicate that DISCONTIGMEM has a higher overhead than sparsemem.  And
FLATMEMs benefits are minimal.  So I think its best to simply standardize
on sparsemem.

Results of page allocator tests (test can be had via git from slab git
tree branch tests)

Measurements in cycle counts. 1000 allocations were performed and then the
average cycle count was calculated.

Order	FlatMem	Discontig	SparseMem
0	  639	  665		  641
1	  567	  647		  593
2	  679	  774		  692
3	  763	  967		  781
4	  961	 1501		  962
5	 1356	 2344		 1392
6	 2224	 3982		 2336
7	 4869	 7225		 5074
8	12500	14048		12732
9	27926	28223		28165
10	58578	58714		58682

(Note that FlatMem is an SMP config and the rest NUMA configurations)

Memory use:

SMP Sparsemem
-------------

Kernel size:

   text    data     bss     dec     hex filename
3849268  397739 1264856 5511863  541ab7 vmlinux

             total       used       free     shared    buffers     cached
Mem:       8242252      41164    8201088          0        352      11512
-/+ buffers/cache:      29300    8212952
Swap:      9775512          0    9775512

SMP Flatmem
-----------

Kernel size:

   text    data     bss     dec     hex filename
3844612  397739 1264536 5506887  540747 vmlinux

So 4.5k growth in text size vs. FLATMEM.

             total       used       free     shared    buffers     cached
Mem:       8244052      40544    8203508          0        352      11484
-/+ buffers/cache:      28708    8215344

2k growth in overall memory use after boot.

NUMA discontig:

   text    data     bss     dec     hex filename
3888124  470659 1276504 5635287  55fcd7 vmlinux

             total       used       free     shared    buffers     cached
Mem:       8256256      56908    8199348          0        352      11496
-/+ buffers/cache:      45060    8211196
Swap:      9775512          0    9775512

NUMA sparse:

   text    data     bss     dec     hex filename
3896428  470659 1276824 5643911  561e87 vmlinux

8k text growth. Given that we fully inline virt_to_page and friends now
that is rather good.

             total       used       free     shared    buffers     cached
Mem:       8264720      57240    8207480          0        352      11516
-/+ buffers/cache:      45372    8219348
Swap:      9775512          0    9775512

The total available memory is increased by 8k.

This patch makes sparsemem the default and removes discontig and
flatmem support from x86.

[ akpm@linux-foundation.org: allnoconfig build fix ]

Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:30:47 +01:00
..
boot_ioremap_32.c x86: cleanup tlbflush.h variants 2008-01-30 13:30:35 +01:00
discontig_32.c x86: mm/discontig_32.c: make code static 2007-10-30 00:22:22 +01:00
extable_32.c i386: move mm 2007-10-11 11:16:47 +02:00
extable_64.c x86_64: move mm 2007-10-11 11:17:18 +02:00
fault_32.c Merge branch 'v2.6.24-rc1-lockdep' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep 2007-11-03 12:42:52 -07:00
fault_64.c lockdep: fixup irq tracing 2007-10-25 14:01:10 +02:00
highmem_32.c i386: move mm 2007-10-11 11:16:47 +02:00
hugetlbpage.c i386: move mm 2007-10-11 11:16:47 +02:00
init_32.c x86: fix boot crash on HIGHMEM4G && SPARSEMEM 2008-01-15 16:44:37 +01:00
init_64.c x86: 64-bit, make sparsemem vmemmap the only memory model 2008-01-30 13:30:47 +01:00
ioremap_32.c i386: move mm 2007-10-11 11:16:47 +02:00
ioremap_64.c x86: 64-bit, make sparsemem vmemmap the only memory model 2008-01-30 13:30:47 +01:00
k8topology_64.c x86: use core id bits for apicid_to_node initialization 2008-01-30 13:30:39 +01:00
Makefile x86_64: move mm 2007-10-11 11:17:18 +02:00
Makefile_32 i386: move mm 2007-10-11 11:16:47 +02:00
Makefile_64 x86: remove the duplicated arch/x86/ia32/mmap32.c 2008-01-30 13:30:26 +01:00
mmap_32.c x86: remove the duplicated arch/x86/ia32/mmap32.c 2008-01-30 13:30:26 +01:00
mmap_64.c x86: clean up arch/x86/mm/mmap_32/64.c 2008-01-30 13:30:25 +01:00
numa_64.c x86: 64-bit, make sparsemem vmemmap the only memory model 2008-01-30 13:30:47 +01:00
pageattr_32.c x86: Create clflush() inline, remove hardcoded wbinvd 2007-10-17 20:16:12 +02:00
pageattr_64.c Intel IOMMU: clflush_cache_range now takes size param 2007-10-22 08:13:18 -07:00
pgtable_32.c x86: stop nmi softlockup warnings in show_mem() 2007-10-17 20:15:41 +02:00
srat_64.c x86: 64-bit, make sparsemem vmemmap the only memory model 2008-01-30 13:30:47 +01:00