From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 1 of 5] libxl: validate scheduler parameters Date: Fri, 22 Jun 2012 17:58:18 +0200 Message-ID: <1340380698.4775.5.camel@Solace> References: <998d48ccb8905907cb2f.1340362610@cosworth.uk.xensource.com> <1340364194.26083.87.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6100274881828578320==" Return-path: In-Reply-To: <1340364194.26083.87.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: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============6100274881828578320== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-xxDfaBVpR6LDJgl0RaM3" --=-xxDfaBVpR6LDJgl0RaM3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2012-06-22 at 12:23 +0100, Ian Campbell wrote: > > sched_params_valid is moved and gains a gc+domid parameters and > > s/ctx/CTX/. The call is placed after > > libxl__domain_build_info_setdefault in the create path, because > > set_defaults doesn't have access to the domid and there are other > > callers which don't even have a domid to give it. > >=20 > > Signed-off-by: Ian Campbell >=20 > After consultation with Ian J and Dario I have committed this one in > order to get a test pass ASAP. I'll leave the remainder of this series > to get properly reviewed. >=20 This looked good at inspection, and it indeed works for the credit scheduler. Unfortunately, sedf seems to require the domain's vcpus to be properly setup (in the hypervisor), which is not true at this point (it is still too early!). In fact, what happens is it fails right here: > > diff -r 5fb3c536b5a8 -r 998d48ccb890 tools/libxl/libxl_create.c > > --- a/tools/libxl/libxl_create.c Fri Jun 22 10:14:46 2012 +0100 > > +++ b/tools/libxl/libxl_create.c Fri Jun 22 11:41:43 2012 +0100 > > @@ -72,6 +72,49 @@ int libxl__domain_create_info_setdefault > > return 0; > > } > > =20 > > +static int sched_params_valid(libxl__gc *gc, > > + uint32_t domid, libxl_domain_sched_param= s *scp) > > +{ > > + int has_weight =3D scp->weight !=3D LIBXL_DOMAIN_SCHED_PARAM_WEIGH= T_DEFAULT; > > + int has_period =3D scp->period !=3D LIBXL_DOMAIN_SCHED_PARAM_PERIO= D_DEFAULT; > > + int has_slice =3D scp->slice !=3D LIBXL_DOMAIN_SCHED_PARAM_SLICE_D= EFAULT; > > + int has_extratime =3D > > + scp->extratime !=3D LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME= _DEFAULT; > > + libxl_domain_sched_params sci; > > + > > + libxl_domain_sched_params_get(CTX, domid, &sci); > > + With a splat like this: (XEN) ----[ Xen-4.2-unstable x86_64 debug=3Dy Not tainted ]---- (XEN) CPU: 0 (XEN) RIP: e008:[] sedf_adjust+0x8bd/0x9ad (XEN) RFLAGS: 0000000000010046 CONTEXT: hypervisor (XEN) rax: 0000000000000000 rbx: 0000000000000000 rcx: 0000000000000001 (XEN) rdx: ffff82c4802b7e48 rsi: ffff83023e401000 rdi: ffff83031b3e34e4 Because of this code in xen/common/sched_sedf.c: if ( p->vcpu[0] =3D=3D NULL ) { rc =3D -EINVAL; goto out; } What I expect to happen, then, is the win7 HVM tests to restart being successful, but the sedf-s ones restart failing. :-( New patch against this patch coming. This time I tested it on both sedf and credit and tested rebooting a domain as well... Let's hope this is going to be the end of this! 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) --=-xxDfaBVpR6LDJgl0RaM3 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/klhoACgkQk4XaBE3IOsT0WACgiKMaYBYWjfkLX/FiI6kMB9WG m6wAnRgz/o8/ykO8FOxUOHqbTQTzDTS5 =vyzB -----END PGP SIGNATURE----- --=-xxDfaBVpR6LDJgl0RaM3-- --===============6100274881828578320== 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 --===============6100274881828578320==--