From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v7 for Xen 4.7 3/4] libxl: enable per-VCPU parameter settings for RTDS scheduler Date: Thu, 17 Mar 2016 05:29:45 +0100 Message-ID: <1458188985.3102.998.camel@citrix.com> References: <1458146871-2813-1-git-send-email-lichong659@gmail.com> <1458146871-2813-4-git-send-email-lichong659@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0991701708994576441==" Return-path: In-Reply-To: <1458146871-2813-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 --===============0991701708994576441== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-x0MPclKd6tAdI0Wx0OTx" --=-x0MPclKd6tAdI0Wx0OTx Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2016-03-16 at 11:47 -0500, Chong Li wrote: > Add libxl_vcpu_sched_params_get/set and sched_rtds_vcpu_get/set > functions to support per-VCPU settings. >=20 And a couple more things that I forgot. I'd shorten the subject line, as already suggested for libxc. > +/* Get the RTDS scheduling parameters of vcpu(s) */ > +static int sched_rtds_vcpu_get(libxl__gc *gc, uint32_t domid, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0libxl_vcpu_sched_params *scinfo) > +{ I think this should be called static int sched_rtds_vcpu_params_get(libxl__gc *gc, uint32_t domid, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 libxl_vcpu_sched_params *scinfo) for homogeneity with the _set counterpart here below: > @@ -5873,6 +6048,74 @@ int libxl_domain_sched_params_set(libxl_ctx > *ctx, uint32_t domid, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return ret; > =C2=A0} > =C2=A0 > +int libxl_vcpu_sched_params_set(libxl_ctx *ctx, uint32_t domid, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0const libxl_vcpu_sched_params > *scinfo) > +{ So, this function takes a=C2=A0libxl_vcpu_sched_params*, which is basically an array of vcpus' parameters, one element per vcpu (and it can be sparse). Are there any restrictions on how such array should be constructed, for calling this function? Are they any special meaning of particular configurations of the array? I think at least the latter is true, in fact: =C2=A0- this calls=C2=A0sched_rtds_vcpus_params_set(); =C2=A0- in there, if the array is empty, we fail; =C2=A0- if the array has one or more elements, we deal with the vcpus=C2=A0 =C2=A0 =C2=A0(and just them) specified in the elements of the array itself. Then there is=C2=A0libxl_vcpu_sched_params_set_all(). That one: =C2=A0- calls=C2=A0sched_rtds_vcpus_params_set_all(); =C2=A0- in there, if the array has more than just one element, we fail. And then the get side, with libxl_vcpu_sched_params_get(). That one: =C2=A0- calls sched_rtds_vcpu_get(); =C2=A0- in there, if the array is empty, we create one, and return info for= =C2=A0 =C2=A0 =C2=A0all the vcpus; =C2=A0- if the array has one or more elements, we deal with them (and just= =C2=A0 =C2=A0 =C2=A0them). I think this should be documented some (unless it's already there and I missed it). Thanks and Regards again, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-x0MPclKd6tAdI0Wx0OTx 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 iEYEABECAAYFAlbqMrkACgkQk4XaBE3IOsR0ugCcCSlJZOiEDeDsxt+CPbGuUhQq fMcAniu9kIpYGycGB6eojM/Fd7gXsQA+ =bEW4 -----END PGP SIGNATURE----- --=-x0MPclKd6tAdI0Wx0OTx-- --===============0991701708994576441== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============0991701708994576441==--