From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v4 03/15] libxl: introduce libxl_get_nr_cpus() Date: Tue, 3 Dec 2013 18:52:37 +0100 Message-ID: <1386093157.5338.337.camel@Solace> References: <20131122183332.11200.20231.stgit@Solace> <20131122185658.11200.13074.stgit@Solace> <21150.6530.28766.823281@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5831437049422876087==" Return-path: In-Reply-To: <21150.6530.28766.823281@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: Marcus Granado , Keir Fraser , Ian Campbell , Li Yechen , George Dunlap , Andrew Cooper , Juergen Gross , xen-devel@lists.xen.org, Jan Beulich , Justin Weaver , Matt Wilson , Elena Ufimtseva List-Id: xen-devel@lists.xenproject.org --===============5831437049422876087== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-HglQ2b4scGkWgNj6ZFTs" --=-HglQ2b4scGkWgNj6ZFTs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mar, 2013-12-03 at 17:48 +0000, Ian Jackson wrote: > Dario Faggioli writes ("[PATCH v4 03/15] libxl: introduce libxl_get_nr_cp= us()"): > > to retrieve the actual number of pCPUs on the host. > >=20 > > Signed-off-by: Dario Faggioli > > --- > > tools/libxl/libxl.h | 3 +++ > > tools/libxl/libxl_utils.c | 18 ++++++++++++++++++ > > 2 files changed, 21 insertions(+) > >=20 > > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > > index a9663e4..2fab5ba 100644 > > --- a/tools/libxl/libxl.h > > +++ b/tools/libxl/libxl.h > > @@ -652,6 +652,9 @@ int libxl_domain_preserve(libxl_ctx *ctx, uint32_t = domid, libxl_domain_create_in > > /* get max. number of cpus supported by hypervisor */ > > int libxl_get_max_cpus(libxl_ctx *ctx); > > =20 > > +/* get the actual number of online cpus on the host */ > > +int libxl_get_nr_cpus(libxl_ctx *ctx); >=20 > This number might be out of date as soon as it is read, won't it ? >=20 Quite possible, yes. So, are you suggesting that we shouldn't even allow the user to read it? Or that I should mention that in the comment? (Or something else?) Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-HglQ2b4scGkWgNj6ZFTs 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 v1.4.15 (GNU/Linux) iEYEABECAAYFAlKeGmUACgkQk4XaBE3IOsRsAACfeQuXhK8DmTjj3mlXC4Mpuf/A zTYAnA16w/asurtRpEmuI3Ys5Wkf91JA =A58v -----END PGP SIGNATURE----- --=-HglQ2b4scGkWgNj6ZFTs-- --===============5831437049422876087== 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 --===============5831437049422876087==--