From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v9 9/9] libxl: automatic NUMA placement affects soft affinity Date: Fri, 20 Jun 2014 09:18:48 +0200 Message-ID: <1403248728.16957.0.camel@Solace> References: <20140618141449.21586.55528.stgit@Solace> <20140618142849.21586.23269.stgit@Solace> <1403199230.12893.20.camel@Solace> <20140619174256.GS20819@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6715549805339964699==" Return-path: In-Reply-To: <20140619174256.GS20819@zion.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: Wei Liu Cc: Ian.Jackson@citrix.com, George.Dunlap@citrix.com, Andrew.Cooper3@citrix.com, Ian.Campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============6715549805339964699== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-6B49sYp3nbSPJ+qi2KCO" --=-6B49sYp3nbSPJ+qi2KCO Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On gio, 2014-06-19 at 18:42 +0100, Wei Liu wrote: > On Thu, Jun 19, 2014 at 07:33:50PM +0200, Dario Faggioli wrote: > [...] > > > - rc =3D numa_place_domain(gc, domid, info); > > > + rc =3D libxl_cpu_bitmap_alloc(ctx, &cpumap_soft, 0); > > > if (rc) > > > return rc; > > > + > > > + rc =3D numa_place_domain(gc, domid, info); > > > + if (rc) { > > > + libxl_bitmap_dispose(&cpumap_soft); > > > + return rc; > > > + } > > > + > > > > > Do I need this call to libxl_bitmap_dispose(), to avoid leaking what > > libxl_cpu_bitmap_alloc() did upon return, or does libxl cleans this up > > for me? :-) > >=20 > > As you can see, I'm talking about the case where I'm inside libxl (i.e.= , > > within libxl__build_pre() ) > >=20 >=20 > Yes, you need to call _dispose. The bitmap is allocated with NOGC so > libxl won't free that for you. >=20 Ah, right, found it! Also, re-read the memory management stuff in libxl.h, and it makes sense now. Thanks (and sorry for the stupid question). Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-6B49sYp3nbSPJ+qi2KCO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEABECAAYFAlOj4FgACgkQk4XaBE3IOsTz3wCgmZYpdZkRcYBFMbFsEkWYQk3l 0BkAmgN6PtNXnb7mlDWmEU6FAe1+wEC6 =X8Na -----END PGP SIGNATURE----- --=-6B49sYp3nbSPJ+qi2KCO-- --===============6715549805339964699== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============6715549805339964699==--