All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Dieter Bloms <dieter@bloms.de>, Fantu <fantonifabio@tiscali.it>
Subject: Re: Test result of xen-unstable changeset 25249
Date: Fri, 27 Apr 2012 17:20:25 +0200	[thread overview]
Message-ID: <1335540025.2488.67.camel@Abyss> (raw)
In-Reply-To: <1335517688.28015.180.camel@zakaz.uk.xensource.com>


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

On Fri, 2012-04-27 at 10:08 +0100, Ian Campbell wrote: 
> > I think what we really want to do is is any of the parameters are set, 
> > after the domain is first created, to read the scheduling parameters for 
> > the domain (which will be the defaults), change the ones that are set in 
> > the config file, and then write the whole structure back.  That 
> > shouldn't be too hard, as libxl__sched_set_params() is called after the 
> > domain itself is created;
> 
> I guess the low level libxl_sched_*_params_set should take care of this?
> 
Possibly, but there's more I'm not sure I understand in the patch (the
original patch, the one that has been checked-in on Wednesday):

+int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_sched_params *scparams)
+{
+    libxl_ctx *ctx = 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 = libxl_get_scheduler (ctx);
+    switch (sched) {
+    case LIBXL_SCHEDULER_SEDF:
+      sedf_info.period = scparams->period;
+      sedf_info.slice = scparams->slice;
+      sedf_info.latency = scparams->latency;
+      sedf_info.extratime = scparams->extratime;
+      sedf_info.weight = scparams->weight;
+      ret=libxl_sched_sedf_domain_set(ctx, domid, &sedf_info);
+      break;
+    case LIBXL_SCHEDULER_CREDIT:
+      credit_info.weight = scparams->weight;
<snip>

sched gets the return value of libxl_get_scheduler() which, if I'm not
wrong , read the "default" xen scheduler for this boot, i.e., the one
specified by the "sched=" boot command line or whatever the default for
that is (credit1).

After that it decides what libxl_sched_*_domain_set() to call basing
right on that value. What I'm missing is what prevents the domain in
question to be part of a cpupool (e.g., by specifying "poolid=" in its
config file as well) for which the scheduler is a different one.

It seems to me that, in such case, we will be setting the wrong set of
parameters anyway, independently on how well we manage in putting a
default in place for them... Am I missing something? If not, as I
haven't found any way of finding out what scheduler is actually being
used for a specific domain, shouldn't we add or mimic that (going
through cpupool, perhaps, I haven't checked yet)?

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

  parent reply	other threads:[~2012-04-27 15:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 10:26 Test result of xen-unstable changeset 25249 Fantu
2012-04-26 11:55 ` Ian Campbell
2012-04-26 12:06   ` Fantu
2012-04-26 13:49     ` Ian Campbell
2012-04-26 13:57       ` Fantu
2012-04-26 14:21         ` Ian Campbell
2012-04-27  8:21   ` Dieter Bloms
2012-04-27  8:44     ` George Dunlap
2012-04-27  9:08       ` Ian Campbell
2012-04-27 12:15         ` Fantu
2012-04-27 13:19           ` Ian Campbell
2012-04-27 14:27             ` Fantu
2012-04-27 14:36               ` Ian Campbell
2012-04-30  8:37                 ` Fantu
2012-04-30  9:10                   ` Fantu
2012-04-27 15:20         ` Dario Faggioli [this message]
2012-04-27 15:28           ` Ian Campbell
2012-04-27 15:35             ` Dario Faggioli
2012-04-27 15:38               ` 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=1335540025.2488.67.camel@Abyss \
    --to=dario.faggioli@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dieter@bloms.de \
    --cc=fantonifabio@tiscali.it \
    --cc=george.dunlap@eu.citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.