From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 3/8] tools: arm: allocate large pages to guests. Date: Thu, 12 Jun 2014 09:47:01 +0100 Message-ID: <53996905.4070308@linaro.org> References: <1402504640.16332.50.camel@kazak.uk.xensource.com> <1402504804-29173-3-git-send-email-ian.campbell@citrix.com> <5398C9A1.1000701@linaro.org> <1402557572.31087.53.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1402557572.31087.53.camel@dagon.hellion.org.uk> 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 12/06/14 08:19, Ian Campbell wrote: > On Wed, 2014-06-11 at 22:26 +0100, Julien Grall wrote: >> Hi Ian, >> >> On 11/06/14 17:39, Ian Campbell wrote: >>> Previously we would allocate in batches of up to 4GB worth of pages (allocsz >>> clamped at 1024*1024 pages) however this would now require 8MB worth of start >>> for the extents array in populate_one_size. Reduce to just 256*1024 or 1GB >>> worth of pages (at level 3) or 2MB of stack. >> >> I think you can drop this paragraph. You are using calloc rather than >> the stack in your patch. > > Oops, yes. I'll do that on commit unless I have another reason to > resend. > >>> - return rc; >>> + for ( pfn = 0; pfn < nr_pfns; pfn++ ) >>> + dom->p2m_host[pfn] = base_pfn + pfn; >>> + >>> +out: >>> + free(extents); >> >> Does free preserve errno? I can't find anything saying it... If so we >> may lose it when there is not enought memory. > > I'm not 100% sure but I'm almost certain it is fine. free() returns void > and http://pubs.opengroup.org/onlinepubs/007908799/xsh/free.html says no > error codes are defined for it. Thanks for the answer. Assuming that: Acked-by: Julien Grall Regards, -- Julien Grall