From: Ian Campbell 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 17:27:59 +0100 Message-ID: <1335284879.4347.221.camel@zakaz.uk.xensource.com> References: <1334934791.28331.101.camel@zakaz.uk.xensource.com> <20120423094623.GA13565@bloms.de> <1335182682.4347.15.camel@zakaz.uk.xensource.com> <1335190962.3122.10.camel@Abyss> <20120423154112.GA15320@bloms.de> <1335197251.22133.5.camel@Solace> <20120423193518.GA16134@bloms.de> <1335247525.2397.4.camel@Abyss> <20120424121402.GA19331@bloms.de> <1335272980.4347.122.camel@zakaz.uk.xensource.com> <20120424143329.GB19331@bloms.de> <1335279087.4347.186.camel@zakaz.uk.xensource.com> <20374.52925.940533.95590@mariner.uk.xensource.com> <1335284131.4347.216.camel@zakaz.uk.xensource.com> <20374.53940.224705.242658@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20374.53940.224705.242658@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: George Dunlap , Dario Faggioli , Dieter Bloms , xen-devel List-Id: xen-devel@lists.xenproject.org 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.