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: Wed, 11 Jun 2014 22:26:57 +0100 Message-ID: <5398C9A1.1000701@linaro.org> References: <1402504640.16332.50.camel@kazak.uk.xensource.com> <1402504804-29173-3-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1402504804-29173-3-git-send-email-ian.campbell@citrix.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 , xen-devel@lists.xen.org Cc: tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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. > - 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. Regards, -- Julien Grall