From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 for Xen 4.6 4/4] xl: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler Date: Mon, 8 Jun 2015 18:21:13 +0200 Message-ID: <1433780473.2403.37.camel@citrix.com> References: <1432599084-20956-1-git-send-email-chong.li@wustl.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0553798936638035690==" Return-path: In-Reply-To: <1432599084-20956-1-git-send-email-chong.li@wustl.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chong Li Cc: Chong Li , wei.liu2@citrix.com, Sisu Xi , george.dunlap@eu.citrix.com, xen-devel@lists.xen.org, mengxu@cis.upenn.edu, dgolomb@seas.upenn.edu List-Id: xen-devel@lists.xenproject.org --===============0553798936638035690== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-kFRyhox9YfwRNEVg7IKH" --=-kFRyhox9YfwRNEVg7IKH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2015-05-25 at 19:11 -0500, Chong Li wrote: > Change main_sched_rtds and related output functions to support per-VCPU s= ettings > for xl sched-rtds tool. >=20 > Signed-off-by: Chong Li > Signed-off-by: Meng Xu > Signed-off-by: Sisu Xi > --- > tools/libxl/xl_cmdimpl.c | 261 +++++++++++++++++++++++++++++++++++++++++= ------ > 1 file changed, 230 insertions(+), 31 deletions(-) >=20 You must be changing tools/libxl/xl_cmdtable.c as well, or new options won't work (at least they won't show up in the command's help). > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -6120,76 +6186,209 @@ int main_sched_rtds(int argc, char **argv) > { > const char *dom =3D NULL; > const char *cpupool =3D NULL; > - int period =3D 0; /* period is in microsecond */ > - int budget =3D 0; /* budget is in microsecond */ > + > + int *vcpus =3D (int *)xmalloc(sizeof(int)); /* IDs of VCPUs that cha= nge */ > + int *periods =3D (int *)xmalloc(sizeof(int)); /* period is in micros= econd */ > + int *budgets =3D (int *)xmalloc(sizeof(int)); /* budget is in micros= econd */ > + int vcpus_size =3D 1; /* size of vcpus array */ > + int periods_size =3D 1; /* size of periods array */ > + int budgets_size =3D 1; /* size of budgets array */ > + int input_size =3D 0; /* number of the input param set (v, p, b) */ > + bool flag_b =3D false; > + bool flag_p =3D false; > + bool flag_v =3D false; > bool opt_p =3D false; > bool opt_b =3D false; > - int opt, rc; > + bool opt_v =3D false; > + bool opt_o =3D false; /* get per-domain info instead of per-vcpu inf= o */ > + int opt, i; > + int rc =3D 0; > static struct option opts[] =3D { > {"domain", 1, 0, 'd'}, > {"period", 1, 0, 'p'}, > {"budget", 1, 0, 'b'}, > + {"vcpu",1, 0, 'v'}, > {"cpupool", 1, 0, 'c'}, > + {"output", 1, 0, 'o'}, > COMMON_LONG_OPTS, > {0, 0, 0, 0} > }; > I don't like "-o/--output" as the name of the config switch for this. Also, what is the semantic of passing -o, in case one has given different parameters to each vcpus? What would the command print in that case? I think that, while it makes sense to have the interface in place for the setting part, as a shortcut of setting all the parameters of all the vcpus to the same values, for the getting and printing side of things, it make much less sense. I appreciate just now that this probably affect other bits of the interface, as well as other interfaces, and I think we should handle it consistently... What do you think? For example (although this belong to patch 3's review) what libxl_domain_sched_params_get() does in the case I jus described? Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-kFRyhox9YfwRNEVg7IKH 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 iEYEABECAAYFAlV1wPkACgkQk4XaBE3IOsTuhACgj4DmsXI9+nlZA0JS6ejPZJJk bDcAn0SLMHB6FMsMLOsm0LEK3/vaV4id =rF+o -----END PGP SIGNATURE----- --=-kFRyhox9YfwRNEVg7IKH-- --===============0553798936638035690== 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 --===============0553798936638035690==--