From: Wei Liu Subject: Re: [PATCH v3 03/19] libxc: allocate memory with vNUMA information for PV guest Date: Wed, 14 Jan 2015 11:01:58 +0000 Message-ID: <20150114110158.GA4226@zion.uk.xensource.com> References: <1421151107-20842-1-git-send-email-wei.liu2@citrix.com> <1421151107-20842-4-git-send-email-wei.liu2@citrix.com> <54B579C9.2020909@citrix.com> <20150114105359.GZ4226@zion.uk.xensource.com> <54B64BC0.6000903@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54B64BC0.6000903@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: Andrew Cooper Cc: Wei Liu , Ian Campbell , dario.faggioli@citrix.com, Ian Jackson , xen-devel@lists.xen.org, jbeulich@suse.com, Elena Ufimtseva List-Id: xen-devel@lists.xenproject.org On Wed, Jan 14, 2015 at 10:58:08AM +0000, Andrew Cooper wrote: [...] > >>> + &dom->p2m_host[pfn_base+j]); > >>> + > >>> + if ( rc ) > >>> + { > >>> + if ( dom->vnode_to_pnode[i] != XC_VNUMA_NO_NODE ) > >>> + xc_dom_panic(dom->xch, XC_INTERNAL_ERROR, > >>> + "%s: fail to allocate 0x%"PRIx64"/0x%"PRIpfn" pages (v=%d, p=%d)\n", > >>> + __FUNCTION__, pages, dom->total_pages, i, > >>> + dom->vnode_to_pnode[i]); > >> "failed to allocate" > >> > > Fixed. > > > >> I am not sure the total number of pages is useful here, especially as > >> you don't know how many pages have successfully been allocated first. > >> > > Are you suggesting we don't print any number of print more numbers? > > I am not suggesting that you don't print numbers. "pages" is useful to > know in the error message, but "d->total_pages" is not, as you don't > know how many successful allocations have occurred before, and the total > allocated memory so far. > OK. Don't print dom->total_pages then. :-) Wei. > ~Andrew