mm: remove the highmem zones' memmap in the highmem zone
Since 01cefaef40
("mm: provide more accurate estimation
of pages occupied by memmap") allocate the pages from lowmem for the
highmem zones' memmap. So It is not need to reserver the memmap's for
the highmem.
A 2G DDR3 for the arm platform:
On node 0 totalpages: 524288
free_area_init_node: node 0, pgdat 80ccd380, node_mem_map 80d38000
DMA zone: 3568 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 456704 pages, LIFO batch:31
HighMem zone: 528 pages used for memmap
HighMem zone: 67584 pages, LIFO batch:15
On node 0 totalpages: 524288
free_area_init_node: node 0, pgdat 80cd6f40, node_mem_map 80d42000
DMA zone: 3568 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 456704 pages, LIFO batch:31
HighMem zone: 67584 pages, LIFO batch:15
Signed-off-by: Hongbo Zhong <hongbo.zhong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2ebba6b7e1
commit
ba914f4815
|
@ -4937,16 +4937,18 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
|
||||||
* and per-cpu initialisations
|
* and per-cpu initialisations
|
||||||
*/
|
*/
|
||||||
memmap_pages = calc_memmap_size(size, realsize);
|
memmap_pages = calc_memmap_size(size, realsize);
|
||||||
if (freesize >= memmap_pages) {
|
if (!is_highmem_idx(j)) {
|
||||||
freesize -= memmap_pages;
|
if (freesize >= memmap_pages) {
|
||||||
if (memmap_pages)
|
freesize -= memmap_pages;
|
||||||
printk(KERN_DEBUG
|
if (memmap_pages)
|
||||||
" %s zone: %lu pages used for memmap\n",
|
printk(KERN_DEBUG
|
||||||
zone_names[j], memmap_pages);
|
" %s zone: %lu pages used for memmap\n",
|
||||||
} else
|
zone_names[j], memmap_pages);
|
||||||
printk(KERN_WARNING
|
} else
|
||||||
" %s zone: %lu pages exceeds freesize %lu\n",
|
printk(KERN_WARNING
|
||||||
zone_names[j], memmap_pages, freesize);
|
" %s zone: %lu pages exceeds freesize %lu\n",
|
||||||
|
zone_names[j], memmap_pages, freesize);
|
||||||
|
}
|
||||||
|
|
||||||
/* Account for reserved pages */
|
/* Account for reserved pages */
|
||||||
if (j == 0 && freesize > dma_reserve) {
|
if (j == 0 && freesize > dma_reserve) {
|
||||||
|
|
Loading…
Reference in a new issue