xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <raistlin@linux.it>
To: Juergen Gross <juergen.gross@ts.fujitsu.com>
Cc: George Dunlap <dunlapg@umich.edu>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH 1 of 3] Support of getting scheduler defaults
Date: Wed, 23 May 2012 09:22:00 +0200	[thread overview]
Message-ID: <1337757720.27368.58.camel@Solace> (raw)
In-Reply-To: <4FBC76E3.5020602@ts.fujitsu.com>


[-- Attachment #1.1: Type: text/plain, Size: 4052 bytes --]

On Wed, 2012-05-23 at 07:34 +0200, Juergen Gross wrote:
> > #define PERIOD_MAX MILLISECS(10000) /* 10s  */
> > #define PERIOD_MIN (MICROSECS(10))  /* 10us */
> > #define SLICE_MIN (MICROSECS(5))    /*  5us */
> 
> I think this should remain in the hypervisor only.
> 
Me too.

> > Also, extratime is a flag, so I think 0 and 1 are both meaningful
> > values, maybe we can go for -1 as for cap (I'll try and let you know).
> 
> Why not -1 for all values?
> 
Would work, I guess, unless there's some collision with big weights
represented on short unsigned value (not sure it's like that, and I've
always been bad at this kind of math! :-P).

> >> I'm pretty sure that libxl__sched_set_params needs to get the correct
> >> scheduler for the particular domain, but I've no idea how to get that...
> >>
> > Again, I was thinking something like what Juergen did here could help
> > (go getting the scheduler of the cpupool the domain belongs to)... O am
> > I misunderstanding the issue?
> >
> > +    poolinfo = libxl_list_cpupool(ctx,&n_pools);
> > +    if (!poolinfo)
> > +        return ERROR_NOMEM;
> > +
> > +    ret = ERROR_INVAL;
> > +    for (p = 0; p<  n_pools; p++) {
> > +        if (poolinfo[p].poolid == poolid) {
> > +            scparams->sched = poolinfo[p].sched;
> > +            ret = 0;
> > +        }
> > +        libxl_cpupoolinfo_dispose(poolinfo + p);
> > +    }
> > +
> 
> This was exactly the purpose of the sniplet.
> 
Good to hear that. :-)

> > # xl create vm1.cfg
> > Parsing config from vm1.cfg
> > libxl: error: libxl.c:3417:libxl_sched_sedf_domain_set: setting domain sched sedf: Invalid argument
> >
> > And I'm getting the above independently on what I put in the config file
> > (valid params, no params at all, etc.). I also can't change the
> > scheduling parameters of a domain on-line anymore:
> >
> > # xl sched-sedf -d 3 -p 100 -s 50
> > libxl: error: libxl.c:3417:libxl_sched_sedf_domain_set: setting domain sched sedf: Invalid argument
> > libxl_sched_sedf_domain_set failed.
> >
> > I'll try digging a bit more into this ASAP.
> 
> It's easy: Ian repeated an error he (and I) corrected elsewhere:
> He's always setting period, regardless of the changed parameter...
> 
Not sure, I think Ian's patch fixes that:

--- a/tools/libxl/xl_cmdimpl.c  Tue May 22 14:19:07 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue May 22 15:58:47 2012 +0100
@@ -627,23 +627,20 @@ static void parse_config_data(const char
 
     libxl_domain_build_info_init_type(b_info, c_info->type);
 
-    /* the following is the actual config parsing with overriding values in the structures */
+    /* the following is the actual config parsing with overriding
+     * values in the structures */
     if (!xlu_cfg_get_long (config, "cpu_weight", &l, 0))
         b_info->sched_params.weight = l;
     if (!xlu_cfg_get_long (config, "cap", &l, 0))
         b_info->sched_params.cap = l;
-    if (!xlu_cfg_get_long (config, "tslice_ms", &l, 0))
-        b_info->sched_params.tslice_ms = l;
-    if (!xlu_cfg_get_long (config, "ratelimit_us", &l, 0))
-        b_info->sched_params.ratelimit_us = l;
     if (!xlu_cfg_get_long (config, "period", &l, 0))
         b_info->sched_params.period = l;
     if (!xlu_cfg_get_long (config, "slice", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.slice = l;
     if (!xlu_cfg_get_long (config, "latency", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.latency = l;
     if (!xlu_cfg_get_long (config, "extratime", &l, 0))
-        b_info->sched_params.period = l;
+        b_info->sched_params.extratime = l;
 

So it has to be something else...

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

  reply	other threads:[~2012-05-23  7:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22  9:16 [PATCH 0 of 3] support of setting scheduler parameters on domain creation Juergen Gross
2012-05-22  9:16 ` [PATCH 1 of 3] Support of getting scheduler defaults Juergen Gross
2012-05-22 12:22   ` Ian Campbell
2012-05-22 12:29     ` Juergen Gross
2012-05-22 12:32       ` Ian Campbell
2012-05-22 12:58         ` Juergen Gross
2012-05-22 13:05           ` George Dunlap
2012-05-22 13:16             ` Ian Campbell
2012-05-22 13:40             ` Ian Campbell
2012-05-22 14:59               ` Ian Campbell
2012-05-22 23:46                 ` Dario Faggioli
2012-05-23  5:34                   ` Juergen Gross
2012-05-23  7:22                     ` Dario Faggioli [this message]
2012-05-23  7:41                       ` Ian Campbell
2012-05-23  8:45                         ` Juergen Gross
2012-05-23  9:17                           ` Ian Campbell
2012-05-23 10:18                           ` Dario Faggioli
2012-05-23  8:48                       ` Juergen Gross
2012-05-22  9:16 ` [PATCH 2 of 3] Support getting scheduler defaults in libxc Juergen Gross
2012-05-22  9:16 ` [PATCH 3 of 3] full support of setting scheduler parameters on domain creation Juergen Gross
2012-05-22 12:30   ` Ian Campbell
2012-05-22 12:39     ` Juergen Gross
2012-05-22 12:51       ` Ian Campbell
2012-05-22 22:15       ` Dario Faggioli

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=1337757720.27368.58.camel@Solace \
    --to=raistlin@linux.it \
    --cc=Ian.Campbell@citrix.com \
    --cc=dunlapg@umich.edu \
    --cc=juergen.gross@ts.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    /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).