[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CC889AF.1020402@goop.org>
Date: Wed, 27 Oct 2010 13:21:03 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Yinghai Lu <yinghai@...nel.org>
CC: "H. Peter Anvin" <hpa@...or.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: Re: early_node_mem()'s memory allocation policy
On 10/26/2010 10:49 PM, Yinghai Lu wrote:
> please check
>
> [PATCH] x86, memblock: Fix early_node_mem with big reserved region.
>
> Jeremy said Xen could reserve huge mem but still show as ram in e820.
>
> early_node_mem could not find range because of start/end adjusting.
>
> Let's use memblock_find_in_range instead ***_node. So get real top down in fallback path.
>
> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>
Yes, that works. Could you queue it for upstream? Without this we see
Xen crashes with certain memory configurations.
Thanks,
J
> diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
> index 60f4985..7ffc9b7 100644
> --- a/arch/x86/mm/numa_64.c
> +++ b/arch/x86/mm/numa_64.c
> @@ -178,11 +178,8 @@ static void * __init early_node_mem(int nodeid, unsigned long start,
>
> /* extend the search scope */
> 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 = memblock_x86_find_in_range_node(nodeid, start, end, size, align);
> + start = MAX_DMA_PFN << PAGE_SHIFT;
> + mem = memblock_find_in_range(start, end, size, align);
> if (mem != MEMBLOCK_ERROR)
> 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