From: Wei Liu Subject: Re: [PATCH v4] libxl_set_memory_target: retain the same maxmem offset on top of the current target Date: Thu, 26 Feb 2015 19:18:42 +0000 Message-ID: <20150226191842.GA24542@zion.uk.xensource.com> References: <1424877525-30057-1-git-send-email-stefano.stabellini@eu.citrix.com> <20150226123604.GD1824@zion.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: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Ian.Jackson@eu.citrix.com, xen-devel@lists.xensource.com, Wei Liu , Ian.Campbell@citrix.com, dslutz@verizon.com List-Id: xen-devel@lists.xenproject.org On Thu, Feb 26, 2015 at 06:53:29PM +0000, Stefano Stabellini wrote: [...] > > > } > > > > > > - libxl_dominfo_init(&ptr); > > > - xcinfo2xlinfo(ctx, &info, &ptr); > > > > If I'm not mistaken, &info is only used here. I think you can delete > > info and relevant code all together. > > info is used later as an argument to xc_domain_getinfolist > > What I meant was, the sole purpose of info and two function calls xc_domain_getinfolist + xcinfo2xlinfo is to fill in ptr, which is done by a single call to libxl_domain_info at the beginning of your patch, so it's possible to remove info and those two function calls all together. Wei. > > > > > - uuid = libxl__uuid2string(gc, ptr.uuid); > > > libxl__xs_write(gc, t, libxl__sprintf(gc, "/vm/%s/memory", uuid), > > > "%"PRIu32, new_target_memkb / 1024); > > > - libxl_dominfo_dispose(&ptr); > > > > > > out: > > > if (!xs_transaction_end(ctx->xsh, t, abort_transaction) > > > -- > > > 1.7.10.4 > >