From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 6/7] xen: adds vNUMA info debug-key u Date: Fri, 22 Nov 2013 19:15:22 +0100 Message-ID: <1385144122.21426.52.camel@Solace> References: <1384806262-12532-1-git-send-email-ufimtseva@gmail.com> <1384806262-12532-7-git-send-email-ufimtseva@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8512627239033799933==" Return-path: In-Reply-To: <1384806262-12532-7-git-send-email-ufimtseva@gmail.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: Elena Ufimtseva Cc: keir@xen.org, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, george.dunlap@eu.citrix.com, msw@linux.com, lccycc123@gmail.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org --===============8512627239033799933== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-M7OSG4aXS8ohxZP1mKOk" --=-M7OSG4aXS8ohxZP1mKOk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On lun, 2013-11-18 at 15:24 -0500, Elena Ufimtseva wrote: > Signed-off-by: Elena Ufimtseva > diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c > index b141877..1cf74ee 100644 > @@ -389,6 +389,24 @@ static void dump_numa(unsigned char key) > =20 > for_each_online_node(i) > printk(" Node %u: %u\n", i, page_num_node[i]); > + > + if (d->vnuma.nr_vnodes > 0) > + { > + printk(" Domain has %d vnodes\n", d->vnuma.nr_vnodes); > + for (i =3D 0; i < d->vnuma.nr_vnodes; i++) { > + printk(" vnode %d - pnode %d:", i, ^ I'd intend this a bit less, but that's certainly a minor thing. > + d->vnuma.vnode_to_pnode[i] >=3D MAX_NUMNODES ? -1 : d->vnuma.vnode_= to_pnode[i]); > How long is this line above? :-P > + printk(" %"PRIu64" MB \n", > + (d->vnuma.vmemrange[i].end - d->= vnuma.vmemrange[i].start) >> 20); > + } > + > + printk(" Domain vcpu to vnode: \n"); > + for (i =3D 0; i < d->max_vcpus; i++) > + printk("%s%d %s", i % 8 =3D=3D 0 ? " " : "", > + d->vnuma.vcpu_to_vnode[i], > + (i + 1) % 8 =3D=3D 0 ? "\n" : ""); > Do you have an example of the output for this? Looks like you're just listing the vcpus, although in a specific order... How one is supposed to tell what set of vcpus belong to what vnode? Wouldn't it be clearer to print the list of vcpus belonging to each node right after having printed its memory (i.e., in the for above)? Also, regarding the '(i + 1) % 8 =3D=3D 0 ? "\n" : ""' I found i rather ugly. Itt may be a matter of personal taste, but I think something along the line of: if ( !(i % 8) ) printk("\n"); would be much more readable. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-M7OSG4aXS8ohxZP1mKOk 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) iEYEABECAAYFAlKPnzoACgkQk4XaBE3IOsQvTgCfe1DcxDhMvOLbMhnk+gAyRdsj wbwAnAy7dN++sp1YxG5iE5eOILVavC/U =DSD3 -----END PGP SIGNATURE----- --=-M7OSG4aXS8ohxZP1mKOk-- --===============8512627239033799933== 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 --===============8512627239033799933==--