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

Re: [Xen-devel] [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params



On Fri, 2012-06-01 at 20:14 +0100, Ian Campbell wrote:
> 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

Done.

[...]

> 8<--------------------------------------
> 
> # HG changeset patch
> # User Ian Campbell <ian.campbell@xxxxxxxxxx>
> # 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 <ian.campbell@xxxxxxxxxx>
> 
> 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);
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
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®.