提交 ee408c79 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

[PATCH] x86_64: Don't try to put kernel page tables beyond ZONE_DMA32.

For not fully explained reasons it broke mem=... on several setups.

Also minor cleanup.

Cc: axboe@suse.de
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 142a64a6
...@@ -262,19 +262,11 @@ static void __init find_early_table_space(unsigned long end) ...@@ -262,19 +262,11 @@ static void __init find_early_table_space(unsigned long end)
tables = round_up(puds * sizeof(pud_t), PAGE_SIZE) + tables = round_up(puds * sizeof(pud_t), PAGE_SIZE) +
round_up(pmds * sizeof(pmd_t), PAGE_SIZE); round_up(pmds * sizeof(pmd_t), PAGE_SIZE);
/* Put page tables beyond the DMA zones if possible. /* RED-PEN putting page tables only on node 0 could
RED-PEN might be better to spread them out more over cause a hotspot and fill up ZONE_DMA. The page tables
memory to avoid hotspots */ need roughly 0.5KB per GB. */
if (end > MAX_DMA32_PFN<<PAGE_SHIFT)
start = MAX_DMA32_PFN << PAGE_SHIFT;
else if (end > MAX_DMA_PFN << PAGE_SHIFT)
start = MAX_DMA_PFN << PAGE_SHIFT;
else
start = 0x8000; start = 0x8000;
table_start = find_e820_area(start, end, tables); table_start = find_e820_area(start, end, tables);
if (table_start == -1)
table_start = find_e820_area(0x8000, end, tables);
if (table_start == -1UL) if (table_start == -1UL)
panic("Cannot find space for the kernel page tables"); panic("Cannot find space for the kernel page tables");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册