From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v5 24/24] xl: vNUMA support Date: Tue, 24 Feb 2015 16:44:12 +0000 Message-ID: <1424796249.4742.135.camel@citrix.com> References: <1423770294-9779-1-git-send-email-wei.liu2@citrix.com> <1423770294-9779-25-git-send-email-wei.liu2@citrix.com> <1424794739.4742.118.camel@citrix.com> <20150224163119.GK20083@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5347481322481447060==" Return-path: In-Reply-To: <20150224163119.GK20083@zion.uk.xensource.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 --===============5347481322481447060== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-BgYjfF2ZUO96/7sVyZoU" --=-BgYjfF2ZUO96/7sVyZoU Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-02-24 at 16:31 +0000, Wei Liu wrote: > On Tue, Feb 24, 2015 at 04:19:02PM +0000, Dario Faggioli wrote: > > > + } else if (!strcmp("size", option)) { > > > + val =3D strtoul(value, &endptr, 10); > > > + ABORT_IF_FAILED(value); > > > + p->memkb =3D val << 10; > > > + } else if (!strcmp("vcpus", option)) { > > > + libxl_string_list cpu_spec_list; > > > + int cpu; > > > + unsigned long s, e; > > > + > > > + split_string_into_string_list(value, ",", &cpu_s= pec_list); > > > + len =3D libxl_string_list_length(&cpu_spec_list)= ; > > > + > > > + for (j =3D 0; j < len; j++) { > > > + parse_range(cpu_spec_list[j], &s, &e); > > > + for (cpu =3D s; cpu <=3De; cpu++) > > > + libxl_bitmap_set(&p->vcpus, cpu); > > > + } > > > + libxl_string_list_dispose(&cpu_spec_list); > > > > > I think that using vcpupin_parse() for "vcpus=3D" would allow for more > > flexible syntax (i.e., things like "3-8,^5"), and save some code. The > > only downside is that it also accepts things like "nodes:1", which we > > clearly don't want in here... is that why you are not going for it? > >=20 >=20 > Yes. I don't want "nodes" so I didn't reuse that function, and at that > point I didn't think it's critical to support "^X". >=20 Ok, I just wanted to be sure you were aware of the possibility. I actually agree that supporting "^x" is not that critical here. > If you think this "^X" syntax is important, I can check for "nodes" > before calling vcpupin_parse. >=20 I don't think it is... TBH, I'm more attracted by the code being potentially simpler, and less duplicate parsing logic being around, but I appreciate that having to check for "node[s]" not being present up front would make things look clumsy... so I'm leaving this to you, I'm happy either way. > vcpus_parse? It's not restricted to vcpu pinning in any way, I think. >=20 If you go for it, yes, I like this as a name. Regards, Dario --=-BgYjfF2ZUO96/7sVyZoU 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 iEYEABECAAYFAlTsqloACgkQk4XaBE3IOsQ2wQCeP3RFEWH+p6yaHjJfvGA8w8hU KTcAnjActmlOIyToocIBXuZSHzMqUv1b =VdVa -----END PGP SIGNATURE----- --=-BgYjfF2ZUO96/7sVyZoU-- --===============5347481322481447060== 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 --===============5347481322481447060==--