From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap? Date: Wed, 25 Feb 2015 10:24:37 +0100 Message-ID: <1424856277.4742.179.camel@gmail.com> References: <20150224124101.GX1345@perard.uk.xensource.com> <1424783459.27930.337.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8343860709039776026==" Return-path: In-Reply-To: <1424783459.27930.337.camel@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: Ian Campbell Cc: Anthony PERARD , libvir-list@redhat.com, Jim Fehlig , Ian Jackson , Xen Devel List-Id: xen-devel@lists.xenproject.org --===============8343860709039776026== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-+TZlABUK94FYJ3EqDnsb" --=-+TZlABUK94FYJ3EqDnsb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-02-24 at 13:10 +0000, Ian Campbell wrote: > On Tue, 2015-02-24 at 12:41 +0000, Anthony PERARD wrote: > > What libxl API those provide this information, if it exist? > >=20 > > I found libxl_get_online_cpus() but that not enough. They want a > > bitmap. >=20 > I think that is all which currently exists, at least at the libxl level, > you may need to add a new interface. >=20 > It'd be worth looking into the various host numa interfaces -- perhaps > one of them indirectly exposes what you want? >=20 Given Daniel's latest emails, I'm not sure this is useful but libxl_get_cpu_topology() should put LIBXL_CPUTOPOLOGY_INVALID_ENTRY in all the fields of the i-eth element of the array it returns, if the i-eth pcpu is offline (see the implementation of XEN_SYSCTL_topologyinfo in xen/common/sysctl.c). So, scanning that array and constructing the bitmap according to whether or not we find that marker on the various elements would be the way to go, I would say. I've actually never tested this, i.e., I've never tried offlining a pcpu on the host. I'll give it a go as soon as I find 5 minutes, and let know if it works. Regards, Dario --=-+TZlABUK94FYJ3EqDnsb 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 iEYEABECAAYFAlTtlNUACgkQk4XaBE3IOsSvlACgjGW0JcZT5dWI0LEU7HssQ3HU GBAAn1WP4AFb7aIhntnTyhRjcr3c/ve+ =+Vbo -----END PGP SIGNATURE----- --=-+TZlABUK94FYJ3EqDnsb-- --===============8343860709039776026== 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 --===============8343860709039776026==--