Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

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

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


ian.campbell at citrix

May 29, 2012, 6:56 AM

Post #1 of 9 (262 views)
Permalink
[PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params

This series defines a descriminating value for each scheduler paramter
and uses it to fix a warning when starting a guest:
"Cpu weight out of range, valid values are within range from 1 to 65535"

It also cleans up a few things and adds some convience interfaces for
cpupools.

Big change since v1 is to combine all the domain sched paramter's
set/get functions into a single pair of set/get.

Also the distinguished default values are all now -1.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jun 1, 2012, 4:07 AM

Post #2 of 9 (254 views)
Permalink
Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params [In reply to]

On Tue, 2012-05-29 at 14:56 +0100, Ian Campbell wrote:
> This series defines a descriminating value for each scheduler paramter
> and uses it to fix a warning when starting a guest:
> "Cpu weight out of range, valid values are within range from 1 to 65535"

I applied this with George and Ian J's acks.

Thanks.



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Jun 1, 2012, 11:08 AM

Post #3 of 9 (254 views)
Permalink
Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params [In reply to]

Ian Campbell writes ("Re: [Xen-devel] [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params"):
> On Tue, 2012-05-29 at 14:56 +0100, Ian Campbell wrote:
> > This series defines a descriminating value for each scheduler paramter
> > and uses it to fix a warning when starting a guest:
> > "Cpu weight out of range, valid values are within range from 1 to 65535"
>
> I applied this with George and Ian J's acks.

It seems to have produced a build failure in the ocaml bindings. See
below.

Ian.

make[7]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml/libs/xl'
MLC xenlight.cmo
MLA xenlight.cma
CC xenlight_stubs.o
xenlight_stubs.c: In function 'stub_xl_sched_credit_domain_get':
xenlight_stubs.c:503: error: 'libxl_sched_credit_domain' undeclared (first use in this function)
xenlight_stubs.c:503: error: (Each undeclared identifier is reported only once
xenlight_stubs.c:503: error: for each function it appears in.)
xenlight_stubs.c:503: error: expected ';' before 'c_scinfo'
cc1: warnings being treated as errors
xenlight_stubs.c:504: error: ISO C90 forbids mixed declarations and code
xenlight_stubs.c:508: error: implicit declaration of function 'libxl_sched_credit_domain_get'
xenlight_stubs.c:508: error: 'c_scinfo' undeclared (first use in this function)
xenlight_stubs.c:513: error: implicit declaration of function 'Val_sched_credit_domain'
xenlight_stubs.c: In function 'stub_xl_sched_credit_domain_set':
xenlight_stubs.c:520: error: 'libxl_sched_credit_domain' undeclared (first use in this function)
xenlight_stubs.c:520: error: expected ';' before 'c_scinfo'
xenlight_stubs.c:521: error: ISO C90 forbids mixed declarations and code
xenlight_stubs.c:524: error: implicit declaration of function 'sched_credit_domain_val'
xenlight_stubs.c:524: error: 'c_scinfo' undeclared (first use in this function)
xenlight_stubs.c:527: error: implicit declaration of function 'libxl_sched_credit_domain_set'
make[7]: *** [xenlight_stubs.o] Error 1
make[7]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml/libs/xl'
make[6]: *** [subdir-install-xl] Error 2
make[6]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml/libs'
make[5]: *** [subdirs-install] Error 2
make[5]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml/libs'
make[4]: *** [subdir-install-libs] Error 2
make[4]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml'
make[3]: *** [subdirs-install] Error 2
make[3]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml'
make[2]: *** [subdir-install-ocaml] Error 2
make[2]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools'
make: *** [install-tools] Error 2

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jun 1, 2012, 11:47 AM

Post #4 of 9 (253 views)
Permalink
Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params [In reply to]

On Fri, 2012-06-01 at 19:08 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params"):
> > On Tue, 2012-05-29 at 14:56 +0100, Ian Campbell wrote:
> > > This series defines a descriminating value for each scheduler paramter
> > > and uses it to fix a warning when starting a guest:
> > > "Cpu weight out of range, valid values are within range from 1 to 65535"
> >
> > I applied this with George and Ian J's acks.
>
> It seems to have produced a build failure in the ocaml bindings.

Damn, sorry about that. I swear I compiled this both before sending it
and as part of the commit procedure, and I just tried built it again and
didn't see it.

However I've now done a make clean and can now repro. Patch to follow
shortly.

> See
> below.
>
> Ian.
>
> make[7]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml/libs/xl'
> MLC xenlight.cmo
> MLA xenlight.cma
> CC xenlight_stubs.o
> xenlight_stubs.c: In function 'stub_xl_sched_credit_domain_get':
> xenlight_stubs.c:503: error: 'libxl_sched_credit_domain' undeclared (first use in this function)
> xenlight_stubs.c:503: error: (Each undeclared identifier is reported only once
> xenlight_stubs.c:503: error: for each function it appears in.)
> xenlight_stubs.c:503: error: expected ';' before 'c_scinfo'
> cc1: warnings being treated as errors
> xenlight_stubs.c:504: error: ISO C90 forbids mixed declarations and code
> xenlight_stubs.c:508: error: implicit declaration of function 'libxl_sched_credit_domain_get'
> xenlight_stubs.c:508: error: 'c_scinfo' undeclared (first use in this function)
> xenlight_stubs.c:513: error: implicit declaration of function 'Val_sched_credit_domain'
> xenlight_stubs.c: In function 'stub_xl_sched_credit_domain_set':
> xenlight_stubs.c:520: error: 'libxl_sched_credit_domain' undeclared (first use in this function)
> xenlight_stubs.c:520: error: expected ';' before 'c_scinfo'
> xenlight_stubs.c:521: error: ISO C90 forbids mixed declarations and code
> xenlight_stubs.c:524: error: implicit declaration of function 'sched_credit_domain_val'
> xenlight_stubs.c:524: error: 'c_scinfo' undeclared (first use in this function)
> xenlight_stubs.c:527: error: implicit declaration of function 'libxl_sched_credit_domain_set'
> make[7]: *** [xenlight_stubs.o] Error 1
> make[7]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml/libs/xl'
> make[6]: *** [subdir-install-xl] Error 2
> make[6]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml/libs'
> make[5]: *** [subdirs-install] Error 2
> make[5]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml/libs'
> make[4]: *** [subdir-install-libs] Error 2
> make[4]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml'
> make[3]: *** [subdirs-install] Error 2
> make[3]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/ocaml'
> make[2]: *** [subdir-install-ocaml] Error 2
> make[2]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools'
> make[1]: *** [subdirs-install] Error 2
> make[1]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools'
> make: *** [install-tools] Error 2



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jun 1, 2012, 12:14 PM

Post #5 of 9 (254 views)
Permalink
Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params [In reply to]

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 <ian.campbell [at] citrix>
# 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 [at] citrix>

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 [at] lists
http://lists.xen.org/xen-devel


raistlin at linux

Jun 1, 2012, 11:37 PM

Post #6 of 9 (249 views)
Permalink
Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params [In reply to]

On Fri, 2012-06-01 at 19:47 +0100, Ian Campbell wrote:
> Damn, sorry about that. I swear I compiled this both before sending it
> and as part of the commit procedure, and I just tried built it again and
> didn't see it.
>
Uh? I can build it too...

> However I've now done a make clean and can now repro. Patch to follow
> shortly.
>
Ah, perhaps it is this (I'm not sure I 'make clean'-ed)

Dario

--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
Attachments: signature.asc (0.19 KB)


Ian.Campbell at citrix

Jun 2, 2012, 12:40 AM

Post #7 of 9 (249 views)
Permalink
Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params [In reply to]

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 [at] citrix>
> # 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 [at] citrix>
>
> 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 [at] lists
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jun 2, 2012, 12:41 AM

Post #8 of 9 (250 views)
Permalink
Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params [In reply to]

On Sat, 2012-06-02 at 07:37 +0100, Dario Faggioli wrote:
> On Fri, 2012-06-01 at 19:47 +0100, Ian Campbell wrote:
> > Damn, sorry about that. I swear I compiled this both before sending it
> > and as part of the commit procedure, and I just tried built it again and
> > didn't see it.
> >
> Uh? I can build it too...

So, apparently, could test flight 13006, which is odd because I thought
the test system was doing everything totally from scratch.

I've pushed the fix anyway.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Jun 6, 2012, 3:38 AM

Post #9 of 9 (248 views)
Permalink
Re: [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params [In reply to]

Ian Campbell writes ("Re: [Xen-devel] [PATCH 0 of 5 V2] libxl: make it possible to explicitly specify default sched params"):
> On Sat, 2012-06-02 at 07:37 +0100, Dario Faggioli wrote:
> > Uh? I can build it too...
>
> So, apparently, could test flight 13006, which is odd because I thought
> the test system was doing everything totally from scratch.

The test system doesn't have ocaml installed because when it did it
exposed what seemed to be a bug in the ocaml xenstored, which I
haven't yet had time to investigate.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.