[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Xen-users] xl doesn't honour the parameter cpu_weight from my config file while xm does honour it



On Tue, 2012-04-24 at 17:20 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [Xen-users] xl doesn't honour the 
> parameter cpu_weight from my config file while xm does honour it"):
> > diff -r aef90d90eb3b tools/libxl/libxl_types.idl
> > --- a/tools/libxl/libxl_types.idl   Tue Apr 24 16:53:00 2012 +0100
> > +++ b/tools/libxl/libxl_types.idl   Tue Apr 24 17:15:12 2012 +0100
> ...
> > +libxl_sched_credit_domain = Struct("sched_credit_domain", [
> > +    ("weight", integer),
> ...
> ...
> > +libxl_sched_credit2_domain = Struct("sched_credit2_domain", [
> > +    ("weight", integer),
> ...
> > +libxl_sched_sedf_domain = Struct("sched_sedf_domain", [
> ...
> > +    ("weight", integer),
> > +    ])
> > +
> > +libxl_sched_arinc653_domain = Struct("sched_arinc653_domain", [
> > +    ("weight", integer),
> > +    ])
> ...
> > +    ("sched_params",     Struct(None, [("credit", 
> > libxl_sched_credit_domain),
> > +                                       ("credit2", 
> > libxl_sched_credit2_domain),
> > +                                       ("sedf", libxl_sched_sedf_domain),
> > +                                       ("arinc653", 
> > libxl_sched_arinc653_domain),
> > +                                       ]))
> 
> The resulting sched_params structure contains four subfields called
> "weight", all of which mean (roughly, obviously) the same thing and
> all of which are to be set from the same "weight" xl configuration
> parameter.  Is this really the most sensible way to do things ?

Perhaps not, but it would imply major surgery to the other scheduler
interfaces to do it some other way (since these same structs are used
for libxl_sched_*_{set,get}.

I'm not 100% sure that "weight" has the same meaning for each scheduler
either. It's at least plausible that I might want one weight for a
doamin if the scheduler is credit and something else if it is sedf.

> Perhaps it would be better to have a single sched_params struct which
> contained all the parameters needed for any scheduler, and simply have
> them ignored by libxl for schedulers we're not using.

You'd need to reconstitute each of the split structs in order to call
libxl_sched_FOO_set internally, I don't think I want to ask Dieter to
take on that much bigger job.

Modulo this IDL bit Dieter's patch looks quite nice.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.