From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v5 11/24] libxl: build, check and pass vNUMA info to Xen for PV guest Date: Tue, 17 Feb 2015 14:49:43 +0000 Message-ID: <1424184581.4235.73.camel@citrix.com> References: <1423770294-9779-1-git-send-email-wei.liu2@citrix.com> <1423770294-9779-12-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8280200542907630330==" Return-path: In-Reply-To: <1423770294-9779-12-git-send-email-wei.liu2@citrix.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: "JBeulich@suse.com" , Andrew Cooper , "xen-devel@lists.xen.org" , "ufimtseva@gmail.com" , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org --===============8280200542907630330== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-4TsYZRplBvMl6mL2sNXo" --=-4TsYZRplBvMl6mL2sNXo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2015-02-12 at 19:44 +0000, Wei Liu wrote: > Transform the user supplied vNUMA configuration into libxl internal > representations, and finally libxc representations. Check validity of > the configuration along the line. >=20 > Signed-off-by: Wei Liu > Cc: Ian Campbell > Cc: Ian Jackson > Cc: Dario Faggioli > Cc: Elena Ufimtseva > Acked-by: Ian Campbell > --- a/tools/libxl/libxl_dom.c > +++ b/tools/libxl/libxl_dom.c =20 > +static int set_vnuma_info(libxl__gc *gc, uint32_t domid, > + const libxl_domain_build_info *info, > + const libxl__domain_build_state *state) > +{ > + int rc =3D 0; > + int i, nr_vdistance; > + unsigned int *vcpu_to_vnode, *vnode_to_pnode, *vdistance =3D NULL; > + > + vcpu_to_vnode =3D libxl__calloc(gc, info->max_vcpus, > + sizeof(unsigned int)); > + vnode_to_pnode =3D libxl__calloc(gc, info->num_vnuma_nodes, > + sizeof(unsigned int)); > + > + nr_vdistance =3D info->num_vnuma_nodes * info->num_vnuma_nodes; > + vdistance =3D libxl__calloc(gc, nr_vdistance, sizeof(unsigned int)); > + > + for (i =3D 0; i < info->num_vnuma_nodes; i++) { > + libxl_vnode_info *v =3D &info->vnuma_nodes[i]; > + int bit; > + > + /* vnode to pnode mapping */ > + vnode_to_pnode[i] =3D v->pnode; > + > + /* vcpu to vnode mapping */ > + libxl_for_each_set_bit(bit, v->vcpus) > + vcpu_to_vnode[bit] =3D i; > + 'bit' made the reader (or at least it made me) think that we're dealing with something that have to do with actual bits, while it's just an index, as usual. For that reason, I'd have gone for 'j' (as 'i' is being used already). However, that's certainly a minor thing, so with or without this change: Reviewed-by: Dario Faggioli Regards, Dario --=-4TsYZRplBvMl6mL2sNXo 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 v2 iEYEABECAAYFAlTjVQUACgkQk4XaBE3IOsS69QCeJ6U61yZ8k7Cry+6FbTkjV8GY I08An0wDeqiK2pIZzrjjQWouJq4QegXh =IP+G -----END PGP SIGNATURE----- --=-4TsYZRplBvMl6mL2sNXo-- --===============8280200542907630330== 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 --===============8280200542907630330==--