From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell 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:14:24 +0100 Message-ID: <1404144864.26896.12.camel@kazak.uk.xensource.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B18C0D.8030503@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xen.org, tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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. Ian.