[PATCH] x86: don't ever allocate PTEs from lowmem

From: Vegard Nossum
Date: Mon Apr 21 2008 - 14:41:44 EST


The PSE feature can be non-present for other reasons than having
CONFIG_DEBUG_PAGEALLOC=y and may OOM for those cases too. Therefore, always
try to allocate PTEs from the normal bootmem pool before falling back to
lowmem.

This is an update of:

commit 509a80c49c512ac88bd67b981145f925a306111b
Author: Ingo Molnar <mingo@xxxxxxx>
Date: Wed Oct 17 18:04:34 2007 +0200

x86: fix CONFIG_PAGEALLOC related boot hangs/OOMs

Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxx>
---
arch/x86/mm/init_32.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index ee1091a..d3a411b 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -91,9 +91,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
if (!(pmd_val(*pmd) & _PAGE_PRESENT)) {
pte_t *page_table = NULL;

-#ifdef CONFIG_DEBUG_PAGEALLOC
page_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE);
-#endif
if (!page_table) {
page_table =
(pte_t *)alloc_bootmem_low_pages(PAGE_SIZE);
--
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/