From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v9 for Xen 4.7 3/4] libxl: enable per-VCPU parameter for RTDS Date: Fri, 1 Apr 2016 14:53:37 +0200 Message-ID: <1459515217.5082.245.camel@citrix.com> References: <1459486786-3085-1-git-send-email-lichong659@gmail.com> <1459486786-3085-4-git-send-email-lichong659@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2870187220806853993==" Return-path: In-Reply-To: <1459486786-3085-4-git-send-email-lichong659@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Chong Li , xen-devel@lists.xen.org Cc: Chong Li , wei.liu2@citrix.com, Sisu Xi , george.dunlap@eu.citrix.com, ian.jackson@eu.citrix.com, Meng Xu , dgolomb@seas.upenn.edu List-Id: xen-devel@lists.xenproject.org --===============2870187220806853993== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Q1LT+74tFGKUo6DNc8Om" --=-Q1LT+74tFGKUo6DNc8Om Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2016-03-31 at 23:59 -0500, Chong Li wrote: > Add libxl_vcpu_sched_params_get/set and sched_rtds_vcpu_get/set > functions to support per-VCPU settings. >=20 > Signed-off-by: Chong Li > Signed-off-by: Meng Xu > Signed-off-by: Sisu Xi >=20 > Acked-by: Wei Liu > Reviewed-by: Dario Faggioli > You added a new function, so you probably should have dropped the tags. Anyway, I'll re-issue mine: Reviewed-by: Dario Faggioli There are still things I'd like being done better. There's a certain amount of code duplication, and there still are two instances of this pattern (the 'else' is superfluous): > +=C2=A0=C2=A0=C2=A0=C2=A0if (scinfo->num_vcpus > 0) { > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0rc =3D ERROR_INVAL; > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto out; > +=C2=A0=C2=A0=C2=A0=C2=A0} else { > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0num_vcpus =3D info.max_v= cpu_id + 1; > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0GCNEW_ARRAY(vcpus, num_v= cpus); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0for (i =3D 0; i < num_vc= pus; i++) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= vcpus[i].vcpuid =3D i; > +=C2=A0=C2=A0=C2=A0=C2=A0} > + But Wei said (a few series versions ago) he is kinda fine with this, and I also don't think the series should be blocked because of it. We can improve and refactor things at a later point (adding this to my TODO list). 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) --=-Q1LT+74tFGKUo6DNc8Om 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 iEYEABECAAYFAlb+b1EACgkQk4XaBE3IOsS1ngCeOWCoRRPiWxN6RgvhgXgO840c LWcAnA2JLd4T8fAXuGH1x3VSg4ZXrtQD =czDm -----END PGP SIGNATURE----- --=-Q1LT+74tFGKUo6DNc8Om-- --===============2870187220806853993== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============2870187220806853993==--