From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 2/4] libxc: report how much memory a domain has on each NUMA node Date: Wed, 5 Mar 2014 16:40:45 +0100 Message-ID: <1394034045.16409.4.camel@Solace> References: <20140305143357.6984.7729.stgit@Solace> <20140305143635.6984.34422.stgit@Solace> <53173D2B.1030405@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1615677058747597982==" Return-path: In-Reply-To: <53173D2B.1030405@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: Ian Campbell , Juergen Gross , Ian Jackson , xen-devel , Jan Beulich , Daniel De Graaf List-Id: xen-devel@lists.xenproject.org --===============1615677058747597982== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-mjdrn47Kal+EfZ902ePE" --=-mjdrn47Kal+EfZ902ePE Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mer, 2014-03-05 at 15:05 +0000, Andrew Cooper wrote: > On 05/03/14 14:36, Dario Faggioli wrote: > > diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c > > index 369c3f3..a2b3c07 100644 > > --- a/tools/libxc/xc_domain.c > > +++ b/tools/libxc/xc_domain.c > > @@ -362,6 +362,34 @@ int xc_domain_getinfo(xc_interface *xch, > > return nr_doms; > > } > > =20 > > +int xc_domain_numainfo(xc_interface *xch, uint32_t domid, > > + int *max_nodes, uint64_t *memkbs) >=20 > max_nodes is an unsigned quantity. libxc is quite fast and loose with > this, but lets not propage wrongness. >=20 True. The bummer is that, as discussed already for other reasons, if I want to use the value returned from libxl_get_max_nodes() as max_nodes, that's an integer. Anyway, I'll work around that, I guess. > > +{ > > + DECLARE_DOMCTL; > > + DECLARE_HYPERCALL_BOUNCE(memkbs, sizeof(uint64_t) * (*max_nodes), > > + XC_HYPERCALL_BUFFER_BOUNCE_OUT); > > + int ret =3D 0; >=20 > Don't need the initialiser. >=20 Ok. Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-mjdrn47Kal+EfZ902ePE 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) iEYEABECAAYFAlMXRX0ACgkQk4XaBE3IOsTq6ACfXLw8o2I9hlb8FS9XLQApERiI op8An3FigyG4rNhHJhmiAscEOSnm2wr2 =l2sc -----END PGP SIGNATURE----- --=-mjdrn47Kal+EfZ902ePE-- --===============1615677058747597982== 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 --===============1615677058747597982==--