From: Dario Faggioli <raistlin@linux.it>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1 of 5] libxl: validate scheduler parameters
Date: Fri, 22 Jun 2012 17:58:18 +0200 [thread overview]
Message-ID: <1340380698.4775.5.camel@Solace> (raw)
In-Reply-To: <1340364194.26083.87.camel@zakaz.uk.xensource.com>
[-- Attachment #1.1: Type: text/plain, Size: 2970 bytes --]
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.
> >
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>
> 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.
>
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;
> > }
> >
> > +static int sched_params_valid(libxl__gc *gc,
> > + uint32_t domid, libxl_domain_sched_params *scp)
> > +{
> > + int has_weight = scp->weight != LIBXL_DOMAIN_SCHED_PARAM_WEIGHT_DEFAULT;
> > + int has_period = scp->period != LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT;
> > + int has_slice = scp->slice != LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT;
> > + int has_extratime =
> > + scp->extratime != 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=y Not tainted ]----
(XEN) CPU: 0
(XEN) RIP: e008:[<ffff82c480120d57>] 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] == NULL )
{
rc = -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
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-06-22 15:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 10:56 [PATCH 0 of 5] xl: fix guest reboot failures Ian Campbell
2012-06-22 10:56 ` [PATCH 1 of 5] libxl: validate scheduler parameters Ian Campbell
2012-06-22 11:23 ` Ian Campbell
2012-06-22 15:58 ` Dario Faggioli [this message]
2012-06-22 16:29 ` Dario Faggioli
2012-06-22 10:56 ` [PATCH 2 of 5] libxl: initialise cpupoolinfo in libxl__domain_scheduler Ian Campbell
2012-06-22 10:56 ` [PATCH 3 of 5] libxl: correct type of cpupool variable Ian Campbell
2012-06-22 10:56 ` [PATCH 4 of 5] libxl: log on failure in cpupool_info and libxl__domain_cpupool Ian Campbell
2012-06-22 10:56 ` [PATCH 5 of 5] xl: initialise domid to an explicitly invalid value Ian Campbell
2012-06-29 14:45 ` [PATCH 0 of 5] xl: fix guest reboot failures Ian Jackson
2012-06-29 14:48 ` Ian Campbell
2012-06-29 14:51 ` Ian Jackson
2012-06-29 14:54 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340380698.4775.5.camel@Solace \
--to=raistlin@linux.it \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).