From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 3 of 3] full support of setting scheduler parameters on domain creation Date: Wed, 23 May 2012 00:15:30 +0200 Message-ID: <1337724930.27368.25.camel@Solace> References: <953383741ff44d97587c.1337678214@nehalem1> <1337689856.10118.100.camel@zakaz.uk.xensource.com> <4FBB890A.4060507@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8660686719987923028==" Return-path: In-Reply-To: <4FBB890A.4060507@ts.fujitsu.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: Juergen Gross Cc: "xen-devel@lists.xensource.com" , Ian Campbell List-Id: xen-devel@lists.xenproject.org --===============8660686719987923028== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-Wek0R7nzfBKqsKKCQrbm" --=-Wek0R7nzfBKqsKKCQrbm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2012-05-22 at 14:39 +0200, Juergen Gross wrote: > > This interface really makes libxl_sched_params differ from all the othe= r > > libxl structs (which have a public _init function and an internal > > setdefaults function). I'm not really sure its justified either, I was > > under the impression that you'd found that there were useful > > discriminating values? >=20 > Dario opted for this solution, so I proposed a patch implementing it. > I prefer this solution, too, as it isn't exporting scheduler internals to > the tools. >=20 Yep. I agree with Ian that having two different procedures for the first as compared to the subsequent operations on the scheduling parameters is bad, but still, as a matter of my personal taste, I'd prefer no to have things belonging to the hypervisor/scheduler replicated in the toolstack, although they're just simple default values. It's still something you need to always remember to check for consistency, or bad things will happen! :-/ However, Ian's approach seems clean and nice as well, and I'm not really sure which one I like most, so don't count me when deciding, I'm fine with both. > >> int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, > >> libxl_sched_params *scparams) > >> { > >> libxl_ctx *ctx =3D libxl__gc_owner(gc); > >> - libxl_scheduler sched; > >> libxl_sched_sedf_domain sedf_info; > >> libxl_sched_credit_domain credit_info; > >> libxl_sched_credit2_domain credit2_info; > >> int ret; > >> > >> - sched =3D libxl_get_scheduler (ctx); > >> - switch (sched) { > >> + switch (scparams->sched) { > > What happens if scparams->sched is not the scheduler used for this > > domain? Should it either be checked or set somewhere? >=20 > The check would be the same as the original setting of scparams->sched. > Setting of the scheduler parameters will be rejected by the hypervisor if= the > scheduler does not match. >=20 I was thinking this should go through finding out what domid's cpupool is and then checking that scheduler, as it is being done somewhere else... Isn't this the case? 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) --=-Wek0R7nzfBKqsKKCQrbm 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+8EAIACgkQk4XaBE3IOsT/rgCgk6IzEgypMZxft8J78Selodw3 KWAAniUUSex63HTbob7mC7hnkYTzkP0j =G/0p -----END PGP SIGNATURE----- --=-Wek0R7nzfBKqsKKCQrbm-- --===============8660686719987923028== 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 --===============8660686719987923028==--