From: Dario Faggioli Subject: Re: [PATCH] xl: fix vcpus to vnode assignement in config file Date: Fri, 17 Jul 2015 19:15:56 +0200 Message-ID: <1437153356.23656.38.camel@citrix.com> References: <20150717155749.4264.74048.stgit@Solace.station> <20150717160802.GQ12455@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3079987864469198843==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZG9FU-00045j-RK for xen-devel@lists.xenproject.org; Fri, 17 Jul 2015 17:16:39 +0000 In-Reply-To: <20150717160802.GQ12455@zion.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: Wei Liu Cc: xen-devel@lists.xenproject.org, Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org --===============3079987864469198843== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Jef+9ekOuUJ0sr50evij" --=-Jef+9ekOuUJ0sr50evij Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2015-07-17 at 17:08 +0100, Wei Liu wrote: > On Fri, Jul 17, 2015 at 05:57:49PM +0200, Dario Faggioli wrote: > > Signed-off-by: Dario Faggioli > > --- > > Cc: Wei Liu > > Cc: Ian Jackson > > Cc: Ian Campbell >=20 > With two issues mentioned below fixed: >=20 > Acked-by: Wei Liu >=20 Thanks. > > --- a/tools/libxl/xl_cmdimpl.c > > +++ b/tools/libxl/xl_cmdimpl.c > > @@ -1076,9 +1076,7 @@ static void parse_vnuma_config(const XLU_Config *= config, > > /* Temporary storage for parsed vcpus information to avoid > > * parsing config twice. This array has num_vnuma elements. > > */ >=20 > Delete this comment as well. >=20 Can I ask why? I think it's still accurate, actually... > > - struct vcpu_range_parsed { > > - unsigned long start, end; > > - } *vcpu_range_parsed; > > + libxl_bitmap *vcpu_parsed; > > @@ -1095,7 +1093,14 @@ static void parse_vnuma_config(const XLU_Config = *config, > > =20 > > b_info->num_vnuma_nodes =3D num_vnuma; > > b_info->vnuma_nodes =3D xcalloc(num_vnuma, sizeof(libxl_vnode_info= )); > > - vcpu_range_parsed =3D xcalloc(num_vnuma, sizeof(*vcpu_range_parsed= )); > > + vcpu_parsed =3D xcalloc(num_vnuma, sizeof(libxl_bitmap)); > > + for (i =3D 0; i < num_vnuma; i++) { > > + libxl_bitmap_init(&vcpu_parsed[i]); > > + if (libxl_cpu_bitmap_alloc(ctx, &vcpu_parsed[i], b_info->max_v= cpus)) { > > + fprintf(stderr, "libxl_node_bitmap_alloc failed.\n"); > > + exit(1); > > + } > > + } > > =20 > > for (i =3D 0; i < b_info->num_vnuma_nodes; i++) { > > libxl_vnode_info *p =3D &b_info->vnuma_nodes[i]; > > @@ -1165,12 +1170,14 @@ static void parse_vnuma_config(const XLU_Config= *config, > > split_string_into_string_list(value, ",", &cpu_spe= c_list); > > len =3D libxl_string_list_length(&cpu_spec_list); > > =20 > > - for (j =3D 0; j < len; j++) > > + for (j =3D 0; j < len; j++) { > > parse_range(cpu_spec_list[j], &s, &e); > > + for (; s <=3De; s++) { >=20 > Space before e. >=20 Bha! Sure, sorry for this. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-Jef+9ekOuUJ0sr50evij 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 iEYEABECAAYFAlWpOEwACgkQk4XaBE3IOsQ6RgCdGer2ncY/9z6p3ZKCIM2JX0KZ 5p4AnjoknpZTCkl8ytIQ3YuXKLB7xhs9 =bd4d -----END PGP SIGNATURE----- --=-Jef+9ekOuUJ0sr50evij-- --===============3079987864469198843== 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 --===============3079987864469198843==--