[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4B27894B.9090705@kernel.org>
Date: Tue, 15 Dec 2009 05:04:11 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: mingo@...e.hu
CC: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>, rdreier@...co.com,
linux-kernel@...r.kernel.org,
Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: bisected crash due to "x86: Move swiotlb initialization before
dma32_free_bootmem"
Yinghai Lu wrote:
> FUJITA Tomonori wrote:
>> I simply wanted to say that it's not a bug that breaks lots of boxes
>> or leads to something serious like data corruption (no need to say
>> something like "revert it now!"). It's also worth investigating why it
>> breaks, I think.
>
> will look at it later
ok, have the solutions for that.
Ingo,
this patch depends on 4 early_res related patches i sent before.
YH
[PATCH] x86: make early_node_mem get mem > 4g if possible
so we could put pgdata for the node high, and later sparse
vmmap will get the section nr that need.
with this patch will make <4g ram will not use sparse vmmap
Signed-off-by: Yinghai Lu <yinghai@...nel.org>
---
arch/x86/mm/numa_64.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
Index: linux-2.6/arch/x86/mm/numa_64.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/numa_64.c
+++ linux-2.6/arch/x86/mm/numa_64.c
@@ -163,14 +163,27 @@ static void * __init early_node_mem(int
unsigned long end, unsigned long size,
unsigned long align)
{
- unsigned long mem = find_e820_area(start, end, size, align);
+ unsigned long mem;
+ /*
+ * put it on high as possible
+ * something will go with NODE_DATA
+ */
+ if (start < (MAX_DMA_PFN<<PAGE_SHIFT))
+ start = MAX_DMA_PFN<<PAGE_SHIFT;
+ if (start < (MAX_DMA32_PFN<<PAGE_SHIFT) &&
+ end > (MAX_DMA32_PFN<<PAGE_SHIFT))
+ start = MAX_DMA32_PFN<<PAGE_SHIFT;
+ mem = find_e820_area(start, end, size, align);
if (mem != -1L)
return __va(mem);
- start = __pa(MAX_DMA_ADDRESS);
- end = max_low_pfn_mapped << PAGE_SHIFT;
+ end = max_pfn_mapped << PAGE_SHIFT;
+ if (end > (MAX_DMA32_PFN<<PAGE_SHIFT))
+ start = MAX_DMA32_PFN<<PAGE_SHIFT;
+ else
+ start = MAX_DMA_PFN<<PAGE_SHIFT;
mem = find_e820_area(start, end, size, align);
if (mem != -1L)
return __va(mem);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists