From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 11/14] libxl: get and set soft affinity Date: Wed, 20 Nov 2013 13:18:07 +0100 Message-ID: <1384949887.15360.78.camel@Solace> References: <20131118175544.31002.79574.stgit@Solace> <20131118181813.31002.61195.stgit@Solace> <1384881864.16252.48.camel@hastur.hellion.org.uk> <1384883478.19880.170.camel@Abyss> <1384946825.28441.56.camel@kazak.uk.xensource.com> <1384948800.15360.65.camel@Solace> <1384949152.28441.65.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4817605806541245772==" Return-path: In-Reply-To: <1384949152.28441.65.camel@kazak.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 Campbell Cc: Marcus Granado , Keir Fraser , Matt Wilson , Li Yechen , George Dunlap , Andrew Cooper , Juergen Gross , Ian Jackson , xen-devel@lists.xen.org, Jan Beulich , Justin Weaver , Elena Ufimtseva List-Id: xen-devel@lists.xenproject.org --===============4817605806541245772== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ZOOK8EIo0DR3WspFMKhR" --=-ZOOK8EIo0DR3WspFMKhR Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mer, 2013-11-20 at 12:05 +0000, Ian Campbell wrote: > On Wed, 2013-11-20 at 13:00 +0100, Dario Faggioli wrote: > > I'll keep looking but, in case I really don't fine anything, do you wan= t > > me to: > > - stick with this, at least for now; > > - introduce a new libxl (and probably libxc too) interface for this >=20 > I don't understand why libxl_get_max_cpus, which is certainly at least > as big as you need, isn't sufficient here. Especially since in the same > function you call libxl_cpu_bitmap_alloc(...,..., 0) which uses > libxl_get_max_cpus. >=20 As a matter of fact, it's _too_ big! The point here is that, whenever the caller gives me a cpumap that comes from him specifying "all" in the config file, this cpumap is, for instance, on my system, and unsigned int full of 1-s. If you manage to (pretty) print it, that would look like "0-63". After going down to Xen and then back from there, i.e., what happens to ecpumap, the "all" from above has become, again on my system, where I have 16 cpus, something like "0-15". That is, looking at the bits in the actual uint, the first 16 of them to 1, the other to 0. Well, what I want is to be able to _not_ warn the user in this case, since he asked for all the cpus, and that's what he's getting, but for doing that I need to be able to restrict the comparison that is happening in libxl_bitmap_equal() to *only* the actual number of cpus, not the theoretically supported one. > You then use this with "libxl_bitmap_equal(cpumap, &ecpumap, nr_cpus)" > where surely the sizes of cpumap and ecpumap could be used and/or are > what actually matter? (and shouldn't you be checking that the sizes meet > some constraint relative to each other?) >=20 Fair enough. It's very unlikely, but yes, since the interface allows to define bitmaps of different sizes, I should probably check that. Good point actually, but unrelated to and unhelpful to solve my issue. 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) --=-ZOOK8EIo0DR3WspFMKhR 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) iEYEABECAAYFAlKMqH8ACgkQk4XaBE3IOsQVmwCdF+dutFt37y8KGYb22pOWFc5Z 0WMAnjmJkgOpNi3TW6tg0CAPamkz4LAm =Qiy9 -----END PGP SIGNATURE----- --=-ZOOK8EIo0DR3WspFMKhR-- --===============4817605806541245772== 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 --===============4817605806541245772==--