xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <raistlin@linux.it>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Juergen Gross <juergen.gross@ts.fujitsu.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] xl: check for meaningful combination of sedf config file parameters
Date: Wed, 06 Jun 2012 13:05:22 +0200	[thread overview]
Message-ID: <1338980722.6152.30.camel@Solace> (raw)
In-Reply-To: <1338978936.32319.49.camel@zakaz.uk.xensource.com>


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

On Wed, 2012-06-06 at 11:35 +0100, Ian Campbell wrote:
> > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> > --- a/tools/libxl/xl_cmdimpl.c
> > +++ b/tools/libxl/xl_cmdimpl.c
> > @@ -561,6 +561,7 @@ static void parse_config_data(const char
> >      long l;
> >      XLU_Config *config;
> >      XLU_ConfigList *cpus, *vbds, *nics, *pcis, *cvfbs, *cpuids;
> > +    int opt_w = 0, opt_p = 0, opt_s = 0;
> 
> These names don't make much sense in this context.
> 
Yeah, I agree... It's just I needed something :-/

> Perhaps you can just check each interesting option against the
> corresponding LIBXL_DOAIN_SCHED_PARAM_DEFAULT? 
>
Mmm... I was mistakenly thinking these default values not to be there
yet, but I now see it. Yes, I guess I can do that.

> That might make some long
> lines. Perhaps pulling this out into a separate valid_sched_params()
> would help with that?
>
Maybe, but what to put here depends on your thought on the below...

> >      if (!xlu_cfg_get_long (config, "latency", &l, 0))
> >          b_info->sched_params.latency = l;
> >      if (!xlu_cfg_get_long (config, "extratime", &l, 0))
> >          b_info->sched_params.extratime = l;
> > +    /* The sedf scheduler needs some more consistency checking */
> > +    if (opt_w && (opt_p || opt_s)) {
> > +        fprintf(stderr, "Either specify a weight OR a period and slice\n");
> 
> Does this constrain you from setting valid combinations of credit*
> parameters? I think not since period and slice are SEDF specific.
> 
I'd say not at all, for the exact reason you're suggesting. Then, if you
ask what happens if you boot with sched=credit and then try to specify
both a cpu_weight and a period, then yes, it will kick you out.

The whole point is, period and slice are only meaningful for sedf so, if
you are using them, I take it like you meant to be using sedf, and thus
asking for a cpu_weight at the same time is wrong.

Of course, one can think at it the other way around (scheduler is
credit, so cpu_weight is fine and period and slice should be ignored).
If that is better, I can add a libxl_is_the_scheduler_credit? kind of
check to that if...

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-06-06 11:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 14:01 [PATCH] xl: check for meaningful combination of sedf config file parameters Dario Faggioli
2012-06-06 10:35 ` Ian Campbell
2012-06-06 11:05   ` Dario Faggioli [this message]
2012-06-06 11:07     ` Ian Campbell
2012-06-06 10:41 ` Ian Jackson
2012-06-06 10:48   ` Dario Faggioli
2012-06-06 10:57     ` Ian Jackson
2012-06-06 10:49   ` Ian Campbell
2012-06-06 14:23     ` 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=1338980722.6152.30.camel@Solace \
    --to=raistlin@linux.it \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=juergen.gross@ts.fujitsu.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).