All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Dieter Bloms <dieter@bloms.de>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [Xen-users] xl doesn't honour the parameter cpu_weight from my config file while xm does honour it
Date: Tue, 24 Apr 2012 14:27:36 +0100	[thread overview]
Message-ID: <1335274056.4347.136.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <20374.43433.379674.977454@mariner.uk.xensource.com>

On Tue, 2012-04-24 at 14:24 +0100, Ian Jackson wrote:
> Dieter Bloms writes ("Re: [Xen-devel] [Xen-users] xl doesn't honour the parameter cpu_weight from my config file while xm does honour it"):
> > On Tue, Apr 24, Dario Faggioli wrote:
> > > What might be missing is some documentation in docs/man/xl.cfg.pod.5,
> > > explaining about the new options... :-)
> > 
> > I've added a little documentation, so now I hope it is ok.
> 
> This is better, thanks.  I have some comments.
> 
> > +=item B<cpu-weight="weight of cpu (default 256)">
> 
> I'm not qualified to review the documented semantics here.
> 
> > diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> > index 0bdd654..38acff4 100644
> > --- a/tools/libxl/libxl_dom.c
> > +++ b/tools/libxl/libxl_dom.c
> > @@ -124,8 +124,27 @@ int libxl__build_post(libxl__gc *gc, uint32_t domid,
> > +    sched = libxl_get_scheduler (ctx);
> > +    switch (sched) {
> > +    case LIBXL_SCHEDULER_SEDF:
> > +      libxl_sched_sedf_domain_set(ctx, domid, &(info->us.sedf));
> > +      break;
> > +    case LIBXL_SCHEDULER_CREDIT:
> > +      libxl_sched_credit_domain_set(ctx, domid, &(info->us.credit));
> > +      break;
> > +    case LIBXL_SCHEDULER_CREDIT2:
> > +      libxl_sched_credit2_domain_set(ctx, domid, &(info->us.credit2));
> > +      break;
> > +    case LIBXL_SCHEDULER_ARINC653:
> > +      /* not implemented */
> > +      break;
> > +    default:
> > +        abort();
> > +    }
> 
> This is a very repetitive piece of code.  Can't it be autogenerated
> somehow by the idl compiler ?  Ian C ?

Not without a bunch more plumbing in the infrastructure, which would
probably heavily outweigh the code here...

A compromise might be to make this a libxl__sched_set_params(gc, domid,
&info->us), so at least it wouldn't be repeated again somewhere.

> Also, we use 4-character indents and you have used 2.  (If this were
> the only thing that needed changing I would fix it when I committed.)
> 
> > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> > index 5cf9708..c1cdc3c 100644
> > --- a/tools/libxl/libxl_types.idl
> > +++ b/tools/libxl/libxl_types.idl
> > @@ -224,6 +224,27 @@ libxl_domain_create_info = Struct("domain_create_info",[
> > +libxl_sched_credit_domain = Struct("sched_credit_domain", [
> > +    ("weight", integer),
> > +    ("cap", integer),
> > +    ])
> 
> You seem to have just moved many of these about ?

I think he said as much in his commit message? Oh, it was actually in
the comment of hte previous posting:
> I've defined a new union in the libxl_domain_build_info structure.
> For this I had to move some structure definition like
> libxl_sched_credit_domain more to the top.


>   That's just because
> the idl file doesn't support forward declarations, right ?
> 
> Thanks,
> Ian.

  reply	other threads:[~2012-04-24 13:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120420150012.GB3720@bloms.de>
2012-04-20 15:13 ` [Xen-users] xl doesn't honour the parameter cpu_weight from my config file while xm does honour it Ian Campbell
2012-04-20 15:23   ` Dieter Bloms
2012-04-23  9:46   ` Dieter Bloms
2012-04-23 12:04     ` Ian Campbell
2012-04-23 14:22       ` Dario Faggioli
2012-04-23 15:41         ` Dieter Bloms
2012-04-23 16:07           ` Dario Faggioli
2012-04-23 19:35             ` Dieter Bloms
2012-04-24  6:05               ` Dario Faggioli
2012-04-24 12:14                 ` Dieter Bloms
2012-04-24 13:09                   ` Ian Campbell
2012-04-24 14:33                     ` Dieter Bloms
2012-04-24 14:51                       ` Ian Campbell
2012-04-24 16:03                         ` Ian Jackson
2012-04-24 16:15                           ` Ian Campbell
2012-04-24 16:20                             ` Ian Jackson
2012-04-24 16:27                               ` Ian Campbell
2012-04-24 18:26                               ` Dieter Bloms
2012-04-24 19:35                                 ` Dieter Bloms
2012-04-25  9:07                                   ` Ian Campbell
2012-04-25 10:40                                     ` Ian Jackson
2012-04-24 13:24                   ` Ian Jackson
2012-04-24 13:27                     ` Ian Campbell [this message]
2012-04-24 13:33                       ` Ian Jackson

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=1335274056.4347.136.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=dieter@bloms.de \
    --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 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.