From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 8/8] xen: arm: allocate more than one bank for 1:1 domain 0 if needed Date: Fri, 27 Jun 2014 11:31:10 +0100 Message-ID: <53AD47EE.4000106@linaro.org> References: <1403777793.16595.21.camel@kazak.uk.xensource.com> <1403777837-16779-8-git-send-email-ian.campbell@citrix.com> <53AC6480.6080306@linaro.org> <1403861047.32314.15.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403861047.32314.15.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi Ian, On 27/06/14 10:24, Ian Campbell wrote: >> This has to be: bits <= (...). Indeed, we want to try all possible zone. > > Damn. I tested this on midway with "dom0_mem=128M mem=1G" and saw a > failure (which is fixed in this iteration). But obviously midway and > vexpress differ in their physical RAM addresses which caused me to miss > this second failure. > > Have you tried that change? bits < 32 gives you 32-bits (i.e. 0..31) > which should cover everything up to 4G. Or else I'm misremembering some > quirk of the allocation interface. Yes, without the change "<=" I was unable to allocate the first bank. The memory layout is (XEN) Checking for initrd in /chosen (XEN) RAM: 0000000080000000 - 000000009fffffff (XEN) RAM: 00000000a0000000 - 00000000bfffffff (XEN) (XEN) MODULE[1]: 000000009fee6000 - 000000009feea000 (XEN) MODULE[2]: 00000000a0008000 - 00000000a033f458 (XEN) RESVD[0]: 0000000081f00000 - 0000000081f04000 (XEN) RESVD[1]: 000000009fee6000 - 000000009feea000 > Does vexpress really have memory high enough up that excluding bits==32 > excludes it? I thought it was down in the 1-3GB range. The first bank allocating is situated just above 2GB BANK[0] 0x000000a8000000-0x000000b0000000 But I'm unable to find enough memory unless when I pass bits=32 to the allocator. >> I'm looking why Xen doesn't try to allocate in lower memory the first bank. > > Usually it means that at least single page is allocated in each 128MB > block lower down, which can happen depending on how your boot modules > are laid out. With my current layout (see above), I should have space in the first bank (around 0x80000000). I don't really understand why Xen is not trying to use it. > I did consider making > min_low_order = get_order_from_bytes(min_t(paddr_t, dom0_mem/4, MB(128))); > > i.e. for a dom0_mem <= 128MB allowing to be split into 4x32MB banks if > necessary. Or perhaps /2 would be better since 32MB is small enough that > we might have trouble with placing the kernel and modules etc in a > single bank. Require a 128Mb hole in the memory doesn't seem too mad. I would keep this minimum value. Regards, -- Julien Grall