From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 8 of 8] xl: add node-affinity to the output of `xl list` Date: Tue, 9 Oct 2012 12:07:54 +0100 Message-ID: <1349780874.3610.89.camel@Abyss> References: <7fba2d9044e720770c25.1349446106@Solace> <20591.3218.46221.931473@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7314791512416051730==" Return-path: In-Reply-To: <20591.3218.46221.931473@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 , Andre Przywara , Ian Campbell , Anil Madhavapeddy , George Dunlap , Andrew Cooper , Juergen Gross , "xen-devel@lists.xen.org" , Jan Beulich , Daniel De Graaf , Matt Wilson List-Id: xen-devel@lists.xenproject.org --===============7314791512416051730== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-RUZDGG5sN6M8BCPTQXOQ" --=-RUZDGG5sN6M8BCPTQXOQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2012-10-05 at 17:36 +0100, Ian Jackson wrote:=20 > > +static void print_bitmap(uint8_t *map, int maplen, FILE *stream, int c= pu_node) > > +{ > > + int i; > > + uint8_t pmap =3D 0, bitmask =3D 0; > > + int firstset =3D 0, state =3D 0; > > + > > ... >=20 > Is this business with a state variable really the least opaque way of > writing this ? Oh I see you're just moving it about. Oh well.. >=20 I don't think it's any opaque and, yes, I'm mostly moving that print_bitmap function up in the file, but the new status variable is mine (guilty ass charge :-D). Honestly, despite the fact that the function is called print_bitmap(), it contains the following code: case 1: if (firstset =3D=3D 0) { fprintf(stream, "any cpu"); break; } case 3: Which is what made me thinking that opacity was not its first concern in the first place, and that turning it into being opaque was none of this change's business. :-) However, I see your point... Perhaps I can add two functions (something like print_{cpumap,nodemap}()), both calling the original print_bitmap(), and deal with the "any {cpu,node}" case within them...=20 Do you like that better? Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-RUZDGG5sN6M8BCPTQXOQ 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.12 (GNU/Linux) iEYEABECAAYFAlB0BYoACgkQk4XaBE3IOsSAJQCeKtmCmYrjv1iWZGwtmCmEnb+A Qj8An0eYRng5YrJK/T+ITiE/OJSNyxeS =cMWj -----END PGP SIGNATURE----- --=-RUZDGG5sN6M8BCPTQXOQ-- --===============7314791512416051730== 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 --===============7314791512416051730==--