From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params Date: Fri, 1 Jun 2012 20:14:22 +0100 Message-ID: <1338578062.14877.65.camel@dagon.hellion.org.uk> References: <1338548826.17466.88.camel@zakaz.uk.xensource.com> <20425.1295.7385.342986@mariner.uk.xensource.com> <1338576470.14877.58.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1338576470.14877.58.camel@dagon.hellion.org.uk> 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 , Juergen Gross , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-06-01 at 19:47 +0100, Ian Campbell wrote: > Patch to follow shortly. Here we go. Since this fixes the build I'll apply it in the morning unless someone has objected by then (rather than leave the build broken over the 4 day UK bank holiday weekend...), or sooner if someone acks it. I'll also add "make distclean" to my commit process, possibly even a git clean based rune too. 8<-------------------------------------- # HG changeset patch # User Ian Campbell # Date 1338578033 -3600 # Node ID bfe1d242bab30451b55e0bc12624a8e823d9a32a # Parent 0197a9b4fd81dfd03f9df81a1c1eac64b5babdad ocaml: fix build after 25446:648508ee27a2, 25449:68d46c5ea0a3 et al. These renamed a type and the associated functions and the ocaml bindings were not updated to suit. This also highlighted that libxl_domain_sched_params should not be just DIR_IN since it is also use as an output struct. Signed-off-by: Ian Campbell diff -r 0197a9b4fd81 -r bfe1d242bab3 tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Fri Jun 01 19:59:24 2012 +0100 +++ b/tools/libxl/libxl_types.idl Fri Jun 01 20:13:53 2012 +0100 @@ -232,7 +232,7 @@ libxl_domain_sched_params = Struct("doma ("slice", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_SLICE_DEFAULT'}), ("latency", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT'}), ("extratime", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT'}), - ], dir=DIR_IN) + ]) libxl_domain_build_info = Struct("domain_build_info",[ ("max_vcpus", integer), diff -r 0197a9b4fd81 -r bfe1d242bab3 tools/ocaml/libs/xl/genwrap.py --- a/tools/ocaml/libs/xl/genwrap.py Fri Jun 01 19:59:24 2012 +0100 +++ b/tools/ocaml/libs/xl/genwrap.py Fri Jun 01 20:13:53 2012 +0100 @@ -32,8 +32,9 @@ functions = { # ( name , [type1,type2,.. ], "cputopology": [ ("get", ["unit", "t array"]), ], - "sched_credit": [ ("domain_get", ["domid", "t"]), - ("domain_set", ["domid", "t", "unit"]), + "domain_sched_params": + [ ("get", ["domid", "t"]), + ("set", ["domid", "t", "unit"]), ], } def stub_fn_name(ty, name): diff -r 0197a9b4fd81 -r bfe1d242bab3 tools/ocaml/libs/xl/xenlight_stubs.c --- a/tools/ocaml/libs/xl/xenlight_stubs.c Fri Jun 01 19:59:24 2012 +0100 +++ b/tools/ocaml/libs/xl/xenlight_stubs.c Fri Jun 01 20:13:53 2012 +0100 @@ -496,37 +496,37 @@ value stub_xl_cputopology_get(value unit CAMLreturn(topology); } -value stub_xl_sched_credit_domain_get(value domid) +value stub_xl_domain_sched_params_get(value domid) { CAMLparam1(domid); CAMLlocal1(scinfo); - libxl_sched_credit_domain c_scinfo; + libxl_domain_sched_params c_scinfo; int ret; INIT_STRUCT(); INIT_CTX(); - ret = libxl_sched_credit_domain_get(ctx, Int_val(domid), &c_scinfo); + ret = libxl_domain_sched_params_get(ctx, Int_val(domid), &c_scinfo); if (ret != 0) - failwith_xl("sched_credit_domain_get", &lg); + failwith_xl("domain_sched_params_get", &lg); FREE_CTX(); - scinfo = Val_sched_credit_domain(&gc, &lg, &c_scinfo); + scinfo = Val_domain_sched_params(&gc, &lg, &c_scinfo); CAMLreturn(scinfo); } -value stub_xl_sched_credit_domain_set(value domid, value scinfo) +value stub_xl_domain_sched_params_set(value domid, value scinfo) { CAMLparam2(domid, scinfo); - libxl_sched_credit_domain c_scinfo; + libxl_domain_sched_params c_scinfo; int ret; INIT_STRUCT(); - sched_credit_domain_val(&gc, &lg, &c_scinfo, scinfo); + domain_sched_params_val(&gc, &lg, &c_scinfo, scinfo); INIT_CTX(); - ret = libxl_sched_credit_domain_set(ctx, Int_val(domid), &c_scinfo); + ret = libxl_domain_sched_params_set(ctx, Int_val(domid), &c_scinfo); if (ret != 0) - failwith_xl("sched_credit_domain_set", &lg); + failwith_xl("domain_sched_params_set", &lg); FREE_CTX(); CAMLreturn(Val_unit);