From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 6/6] xl: 'xl info' print outstanding claims if enabled (claim_mode=1 in xl.conf) Date: Fri, 29 Mar 2013 09:31:14 -0400 Message-ID: <20130329133114.GF31356@phenom.dumpdata.com> References: <1364417739-10121-1-git-send-email-konrad.wilk@oracle.com> <1364417739-10121-7-git-send-email-konrad.wilk@oracle.com> <20820.29717.491712.538567@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20820.29717.491712.538567@mariner.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 Jackson Cc: Dan Magenheimer , "xen-devel@lists.xensource.com" , Ian Campbell List-Id: xen-devel@lists.xenproject.org On Thu, Mar 28, 2013 at 04:47:17PM +0000, Ian Jackson wrote: > Konrad Rzeszutek Wilk writes ("[PATCH 6/6] xl: 'xl info' print outstanding claims if enabled (claim_mode=1 in xl.conf)"): > > This patch provides the value of the currently outstanding pages > > claimed for all domains. This is a total global value that influences > > the hypervisors' MM system. > > > > When a claim call is done, a reservation for a specific amount of pages > > is set and also a global value is incremented. This global value is then > > reduced as the domain's memory is populated and eventually reaches zero. > > The toolstack can also choose to set the domain's claim to zero which > > cancels the reservation and decrements the global value by the amount > > of claim that has not been satisfied. > > This description is good, but something like it needs to be in the > documentation. The documentation being xl.conf right? It already is in xen.conf thanks to the first patch. > > > +uint64_t libxl_get_claiminfo(libxl_ctx *ctx) > > +{ > > + long l; > > + > > + l = xc_domain_get_outstanding_pages(ctx->xch); > > + if (l < 0) > > + return l; > > + > > + /* In MB */ > > + return (l >> 8); > > +} > > libxl functions should return libxl error values, not whatever you got > from libxc. OK. > > I don't mind very much what the libxc function returns but the libxl > function needs to handle the error properly. See Ian C's comments on > the previous version of this patch. OK, I probably missed something in his reply - the errno that we would mostly get (-ENOSYS) is neutered, so that it would not pipe up to libxl (first patch). However, there is of course nothing stopping from adding better error handling in this code in case we get -EPERM or such. Patch shortly coming up. > > Thanks, > Ian.