From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH RESEND 11/12] xl: numa-sched: enable getting/specifying per-vcpu node-affinity Date: Fri, 8 Nov 2013 10:33:54 +0100 Message-ID: <1383903234.12181.19.camel@Abyss> References: <20131105142844.30446.78671.stgit@Solace> <20131105143604.30446.53765.stgit@Solace> <21115.56554.192020.926963@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2502838147987083664==" Return-path: In-Reply-To: <21115.56554.192020.926963@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 , Daniel De Graaf , Matt Wilson , Elena Ufimtseva List-Id: xen-devel@lists.xenproject.org --===============2502838147987083664== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-2EIm9j4xTmOxV2vabNbm" --=-2EIm9j4xTmOxV2vabNbm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On gio, 2013-11-07 at 18:33 +0000, Ian Jackson wrote: > Dario Faggioli writes ("[PATCH RESEND 11/12] xl: numa-sched: enable getti= ng/specifying per-vcpu node-affinity"): > > by showing it, upon request ('-n' switch), as a part of the > > output of `xl vcpu-list'. Such output looks like this: > ... > > # xl vcpu-list -n > >=20 > > Name ID VCPU CPU State Time(s) CPU Affinity / NUMA Affini= ty > > Domain-0 0 0 8 -b- 4.4 any cpu / any node > > Domain-0 0 1 0 -b- 1.2 any cpu / any node > > vm-test 1 0 8 -b- 2.4 any cpu / 1 > > vm-test 1 1 13 -b- 3.3 any cpu / 1 > >=20 > > The "vcpu-pinning / vcpu-affinity" part may indeed look > > weird, as it is different from the other fields. > > Unfortunately, it's very hard to properly format it in > > columns, since there is no such things as minimal or > > maximal lengths for the bitmaps being printed. >=20 > Can you use the same syntax for printing as would be legal in > the config file ? >=20 That is actually what is happening, for single cpu/node bitmaps. The problem arises when I need to print two bitmaps, one next to the other, like the cpumap for vCPU affinity and the nodemap for NUMA affinity above. The thing is I don't think there is a maximal length for the strings representing the bitmaps being printed, and this no easy way to format the last two values (again "CPU Affinity" and "NUMA Affinity") above in columns... Hence the "/". Ideas? (BTW, the new version of the series I'm preparing will be very different, considering we decided with George and Jan to change the fundamental architecture of the whole thing. However, there still may be the need to doing something like the above, independently whether it will be for printing hard and soft affinity, instead than CPU and NUMA affinity.) > > While at it, the implementation of `xl vcpu-list' is reworked > > a little bit, making it more similar to the one of `xl list' > > and more compliant with the libxl programming paradigm (e.g., > > regarding allocating at the beginning and freeing on exit). >=20 > Can you do this in a pre-patch ? >=20 Ok. > > xl manual page is updated accordingly. >=20 > > -static int update_cpumap_range(const char *str, libxl_bitmap *cpumap) > > +static int update_bitmap_range(const char *str, libxl_bitmap *bitmap) >=20 > I don't understand how this set of changes relates to this patch. >=20 Well, I need to parse strings that may be very similar (the usual "1,2-7,^4" stuff), but with potentially different meaning for the various substrings (pcpus vs. nodes). Anyway, in case I'm keeping this, or doing something similar to this for the new series, I'll try to figure out a way to make it more simple, or at minimum more readable and clarify why it is needed (by breaking the patch down, etc.). 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) --=-2EIm9j4xTmOxV2vabNbm 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) iEYEABECAAYFAlJ8sAIACgkQk4XaBE3IOsSXrgCdHUjx2ifnq312ED83D5K2rGaR PDkAoK20L4YKk/3ymNwpBavTt0iWPXP1 =ZTn6 -----END PGP SIGNATURE----- --=-2EIm9j4xTmOxV2vabNbm-- --===============2502838147987083664== 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 --===============2502838147987083664==--