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: Mon, 30 Jun 2014 17:29:04 +0100 Message-ID: <53B19050.80607@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> <53AD6924.7070102@linaro.org> <1403874060.3169.28.camel@kazak.uk.xensource.com> <53AD6BC9.5030602@linaro.org> <1403874563.3169.30.camel@kazak.uk.xensource.com> <1404143906.26896.10.camel@kazak.uk.xensource.com> <53B18C0D.8030503@linaro.org> <1404144864.26896.12.camel@kazak.uk.xensource.com> <53B18E56.7040401@linaro.org> <1404145620.26896.13.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1404145620.26896.13.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 On 06/30/2014 05:27 PM, Ian Campbell wrote: > On Mon, 2014-06-30 at 17:20 +0100, Julien Grall wrote: >> On 06/30/2014 05:14 PM, Ian Campbell wrote: >>> On Mon, 2014-06-30 at 17:10 +0100, Julien Grall wrote: >>>> Hi Ian, >>>> >>>> On 06/30/2014 04:58 PM, Ian Campbell wrote: >>>>> On Fri, 2014-06-27 at 14:09 +0100, Ian Campbell wrote: >>>>>> On Fri, 2014-06-27 at 14:04 +0100, Julien Grall wrote: >>>>>>> >>>>>>> On 27/06/14 14:01, Ian Campbell wrote: >>>>>>>>> Futhermore, it looks like we always allocate memory from the top of this >>>>>>>>> zone. Is it normal? >>>>>>>> >>>>>>>> Normal behaviour is to allocate from as high as possible so I'm not >>>>>>>> surprised that applies with a zone as well. >>>>>>> >>>>>>> For DOM0 bank allocation, shouldn't we try to allocate as lower as >>>>>>> possible? If not, we may not be able to create a second bank for dom0. >>>>>> >>>>>> The loop over bits is supposed to help there, but it's not as effective >>>>>> with higher addresses I suppose. >>>>>> >>>>>> We'd need a new flag fore the allocate. Which is doable I guess. I'll >>>>>> give it a try. >>>>> >>>>> It's a bit tricky and involves messing with the guts of the page >>>>> allocator, which I'd rather avoid... >>>>> >>>>> We do allow allocations to be merged onto the start of bank 0, which in >>>>> the normal case is what I would expect to happen, although it isn't >>>>> guaranteed. In that case we would try higher addresses and might find >>>>> enough RAM there. >>>>> >>>>> I suppose I could relax the constraint a bit and allow new banks in >>>>> front of bank zero if they were >= 128MB (say). >>>> >>>> So, replacing the bank zero by the new bank, right? IIRC, some Linux >>>> version are requiring the bank to be ordered. >>> >>> Inserting the new bank before, retaining the ordering. >> >> Thanks, this plan sounds good! > > I've implemented it in the obvious way, but I can't for the life of me > get the scenario to actually occur despite playing with module load > location, fdt rsvmem, mem= and dom0_mem=. > > I suppose that gives us some confidence that this is not going to happen > very often... If you send me the patch, I can give a try on the versatile express to see what happen. -- Julien Grall