public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: don't ever allocate PTEs from lowmem
@ 2008-04-21 18:57 Vegard Nossum
  2008-04-21 19:05 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Vegard Nossum @ 2008-04-21 18:57 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, Thomas Gleixner, linux-kernel

Hi,

This is needed for the kernel to boot properly without OOMing if PSE is
not present or disabled for some reason. It is the fix that you proposed for
the kmemcheck OOM-on-boot case. It would also be possible to check the PSE
feature before deciding where to allocate from, but I don't think it really
matters.

Looks ok?

(And yes, this DOES fix the OOM for me. :-D)


Vegard


>From a9ba2e2b1888fad824d3f73561460e2027b2a149 Mon Sep 17 00:00:00 2001
From: Vegard Nossum <vegard.nossum@gmail.com>
Date: Mon, 21 Apr 2008 20:41:44 +0200
Subject: [PATCH] x86: don't ever allocate PTEs from lowmem

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@elte.hu>
Date:   Wed Oct 17 18:04:34 2007 +0200

    x86: fix CONFIG_PAGEALLOC related boot hangs/OOMs

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86: don't ever allocate PTEs from lowmem
  2008-04-21 18:57 [PATCH] x86: don't ever allocate PTEs from lowmem Vegard Nossum
@ 2008-04-21 19:05 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-04-21 19:05 UTC (permalink / raw)
  To: Vegard Nossum; +Cc: Peter Zijlstra, Thomas Gleixner, linux-kernel


* Vegard Nossum <vegard.nossum@gmail.com> wrote:

> Hi,
> 
> This is needed for the kernel to boot properly without OOMing if PSE 
> is not present or disabled for some reason. It is the fix that you 
> proposed for the kmemcheck OOM-on-boot case. It would also be possible 
> to check the PSE feature before deciding where to allocate from, but I 
> don't think it really matters.
> 
> Looks ok?

yes, looks good - thanks, applied.

> (And yes, this DOES fix the OOM for me. :-D)

great :)

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-21 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-21 18:57 [PATCH] x86: don't ever allocate PTEs from lowmem Vegard Nossum
2008-04-21 19:05 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox