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:15:31 +0100 Message-ID: <1335284131.4347.216.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20374.52925.940533.95590@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:03 +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"): > > I mean create a single struct with all of the options in it, from which > > libxl will select the appropriate set of parameters (much like the code > > you have now does. You don't need to decide the content of that struct > > at runtime. > > > > The IDL patch is below, other than changing "us" to "sched_params" I > > think most of the rest of your patch remains the same. > > Missing attachment ? Yes, sorry. Here it is: 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 @@ -224,6 +224,32 @@ libxl_domain_create_info = Struct("domai MemKB = UInt(64, init_val = "LIBXL_MEMKB_DEFAULT") +libxl_sched_credit_domain = Struct("sched_credit_domain", [ + ("weight", integer), + ("cap", integer), + ]) + +libxl_sched_credit_params = Struct("sched_credit_params", [ + ("tslice_ms", integer), + ("ratelimit_us", integer), + ], dispose_fn=None) + +libxl_sched_credit2_domain = Struct("sched_credit2_domain", [ + ("weight", integer), + ]) + +libxl_sched_sedf_domain = Struct("sched_sedf_domain", [ + ("period", integer), + ("slice", integer), + ("latency", integer), + ("extratime", integer), + ("weight", integer), + ]) + +libxl_sched_arinc653_domain = Struct("sched_arinc653_domain", [ + ("weight", integer), + ]) + # Instances of libxl_file_reference contained in this struct which # have been mapped (with libxl_file_reference_map) will be unmapped # by libxl_domain_build/restore. If either of these are never called @@ -256,6 +282,12 @@ libxl_domain_build_info = Struct("domain # extra parameters pass directly to qemu for HVM guest, NULL terminated ("extra_hvm", libxl_string_list), + ("sched_params", Struct(None, [("credit", libxl_sched_credit_domain), + ("credit2", libxl_sched_credit2_domain), + ("sedf", libxl_sched_sedf_domain), + ("arinc653", libxl_sched_arinc653_domain), + ])) + , ("u", KeyedUnion(None, libxl_domain_type, "type", [("hvm", Struct(None, [("firmware", string), ("bios", libxl_bios_type), @@ -417,28 +449,6 @@ libxl_cputopology = Struct("cputopology" ("node", uint32), ], dir=DIR_OUT) -libxl_sched_credit_domain = Struct("sched_credit_domain", [ - ("weight", integer), - ("cap", integer), - ]) - -libxl_sched_credit_params = Struct("sched_credit_params", [ - ("tslice_ms", integer), - ("ratelimit_us", integer), - ], dispose_fn=None) - -libxl_sched_credit2_domain = Struct("sched_credit2_domain", [ - ("weight", integer), - ]) - -libxl_sched_sedf_domain = Struct("sched_sedf_domain", [ - ("period", integer), - ("slice", integer), - ("latency", integer), - ("extratime", integer), - ("weight", integer), - ]) - libxl_event_type = Enumeration("event_type", [ (1, "DOMAIN_SHUTDOWN"), (2, "DOMAIN_DEATH"),