diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-05-24 17:31:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 11:06:56 -0400 |
commit | e48e67e08c340def3d0349c2910d23c7985fb6fa (patch) | |
tree | 8cac490109c34d694147ef55bb2ab80769e5f331 | |
parent | 6dda9d55bf545013597724bf0cd79d01bd2bd944 (diff) |
sparsemem: on no vmemmap path put mem_map on node high too
We need to put mem_map high when virtual memmap is not used.
before this patch
free mem pfn range on first node:
[ 0.000000] 19 - 1f
[ 0.000000] 28 40 - 80 95
[ 0.000000] 702 740 - 1000 1000
[ 0.000000] 347c - 347e
[ 0.000000] 34e7 3500 - 3b80 3b8b
[ 0.000000] 73b8b 73bc0 - 73c00 73c00
[ 0.000000] 73ddd - 73e00
[ 0.000000] 73fdd - 74000
[ 0.000000] 741dd - 74200
[ 0.000000] 743dd - 74400
[ 0.000000] 745dd - 74600
[ 0.000000] 747dd - 74800
[ 0.000000] 749dd - 74a00
[ 0.000000] 74bdd - 74c00
[ 0.000000] 74ddd - 74e00
[ 0.000000] 74fdd - 75000
[ 0.000000] 751dd - 75200
[ 0.000000] 753dd - 75400
[ 0.000000] 755dd - 75600
[ 0.000000] 757dd - 75800
[ 0.000000] 759dd - 75a00
[ 0.000000] 79bdd 79c00 - 7d540 7d550
[ 0.000000] 7f745 - 7f750
[ 0.000000] 10000b 100040 - 2080000 2080000
so only 79c00 - 7d540 are major free block under 4g...
after this patch, we will get
[ 0.000000] 19 - 1f
[ 0.000000] 28 40 - 80 95
[ 0.000000] 702 740 - 1000 1000
[ 0.000000] 347c - 347e
[ 0.000000] 34e7 3500 - 3600 3600
[ 0.000000] 37dd - 3800
[ 0.000000] 39dd - 3a00
[ 0.000000] 3bdd - 3c00
[ 0.000000] 3ddd - 3e00
[ 0.000000] 3fdd - 4000
[ 0.000000] 41dd - 4200
[ 0.000000] 43dd - 4400
[ 0.000000] 45dd - 4600
[ 0.000000] 47dd - 4800
[ 0.000000] 49dd - 4a00
[ 0.000000] 4bdd - 4c00
[ 0.000000] 4ddd - 4e00
[ 0.000000] 4fdd - 5000
[ 0.000000] 51dd - 5200
[ 0.000000] 53dd - 5400
[ 0.000000] 95dd 9600 - 7d540 7d550
[ 0.000000] 7f745 - 7f750
[ 0.000000] 17000b 170040 - 2080000 2080000
we will have 9600 - 7d540 for major free block...
sparse-vmemmap path already used __alloc_bootmem_node_high()
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Greg Thelen <gthelen@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/sparse.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index dc0cc4d43ff3..95ac219af379 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -382,13 +382,15 @@ static void __init sparse_early_usemaps_alloc_node(unsigned long**usemap_map, | |||
382 | struct page __init *sparse_mem_map_populate(unsigned long pnum, int nid) | 382 | struct page __init *sparse_mem_map_populate(unsigned long pnum, int nid) |
383 | { | 383 | { |
384 | struct page *map; | 384 | struct page *map; |
385 | unsigned long size; | ||
385 | 386 | ||
386 | map = alloc_remap(nid, sizeof(struct page) * PAGES_PER_SECTION); | 387 | map = alloc_remap(nid, sizeof(struct page) * PAGES_PER_SECTION); |
387 | if (map) | 388 | if (map) |
388 | return map; | 389 | return map; |
389 | 390 | ||
390 | map = alloc_bootmem_pages_node(NODE_DATA(nid), | 391 | size = PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION); |
391 | PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION)); | 392 | map = __alloc_bootmem_node_high(NODE_DATA(nid), size, |
393 | PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); | ||
392 | return map; | 394 | return map; |
393 | } | 395 | } |
394 | void __init sparse_mem_maps_populate_node(struct page **map_map, | 396 | void __init sparse_mem_maps_populate_node(struct page **map_map, |
@@ -412,7 +414,8 @@ void __init sparse_mem_maps_populate_node(struct page **map_map, | |||
412 | } | 414 | } |
413 | 415 | ||
414 | size = PAGE_ALIGN(size); | 416 | size = PAGE_ALIGN(size); |
415 | map = alloc_bootmem_pages_node(NODE_DATA(nodeid), size * map_count); | 417 | map = __alloc_bootmem_node_high(NODE_DATA(nodeid), size * map_count, |
418 | PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); | ||
416 | if (map) { | 419 | if (map) { |
417 | for (pnum = pnum_begin; pnum < pnum_end; pnum++) { | 420 | for (pnum = pnum_begin; pnum < pnum_end; pnum++) { |
418 | if (!present_section_nr(pnum)) | 421 | if (!present_section_nr(pnum)) |