From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] xl: check for meaningful combination of sedf config file parameters Date: Wed, 06 Jun 2012 13:05:22 +0200 Message-ID: <1338980722.6152.30.camel@Solace> References: <3eadab19abd49fbc6f56.1338818483@Solace> <1338978936.32319.49.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7662033446885818681==" Return-path: In-Reply-To: <1338978936.32319.49.camel@zakaz.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: Ian Campbell Cc: George Dunlap , Juergen Gross , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============7662033446885818681== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-2Q8hCKkrWPimJ6U+OgrQ" --=-2Q8hCKkrWPimJ6U+OgrQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2012-06-06 at 11:35 +0100, Ian Campbell wrote: > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > --- a/tools/libxl/xl_cmdimpl.c > > +++ b/tools/libxl/xl_cmdimpl.c > > @@ -561,6 +561,7 @@ static void parse_config_data(const char > > long l; > > XLU_Config *config; > > XLU_ConfigList *cpus, *vbds, *nics, *pcis, *cvfbs, *cpuids; > > + int opt_w =3D 0, opt_p =3D 0, opt_s =3D 0; >=20 > These names don't make much sense in this context. >=20 Yeah, I agree... It's just I needed something :-/ > Perhaps you can just check each interesting option against the > corresponding LIBXL_DOAIN_SCHED_PARAM_DEFAULT?=20 > Mmm... I was mistakenly thinking these default values not to be there yet, but I now see it. Yes, I guess I can do that. > That might make some long > lines. Perhaps pulling this out into a separate valid_sched_params() > would help with that? > Maybe, but what to put here depends on your thought on the below... > > if (!xlu_cfg_get_long (config, "latency", &l, 0)) > > b_info->sched_params.latency =3D l; > > if (!xlu_cfg_get_long (config, "extratime", &l, 0)) > > b_info->sched_params.extratime =3D l; > > + /* The sedf scheduler needs some more consistency checking */ > > + if (opt_w && (opt_p || opt_s)) { > > + fprintf(stderr, "Either specify a weight OR a period and slice= \n"); >=20 > Does this constrain you from setting valid combinations of credit* > parameters? I think not since period and slice are SEDF specific. >=20 I'd say not at all, for the exact reason you're suggesting. Then, if you ask what happens if you boot with sched=3Dcredit and then try to specify both a cpu_weight and a period, then yes, it will kick you out. The whole point is, period and slice are only meaningful for sedf so, if you are using them, I take it like you meant to be using sedf, and thus asking for a cpu_weight at the same time is wrong. Of course, one can think at it the other way around (scheduler is credit, so cpu_weight is fine and period and slice should be ignored). If that is better, I can add a libxl_is_the_scheduler_credit? kind of check to that if... Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-2Q8hCKkrWPimJ6U+OgrQ 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 v1.4.12 (GNU/Linux) iEYEABECAAYFAk/POXIACgkQk4XaBE3IOsRwfwCgkR0woiL/MLJ5wLoSSskFa3wS nZ4AnAiRZfZpjuw30XtdTNp1we+PB+RN =MT0A -----END PGP SIGNATURE----- --=-2Q8hCKkrWPimJ6U+OgrQ-- --===============7662033446885818681== 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 --===============7662033446885818681==--