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

Re: [Xen-devel] [PATCH 3 of 3] full support of setting scheduler parameters on domain creation



> # HG changeset patch
> # User Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
> # Date 1337677423 -7200
> # Node ID 953383741ff44d97587c2e75da79b092523d6e83
> # Parent  19aaa30d7fdce2f1b56cb13399d603d955a61fb8
> full support of setting scheduler parameters on domain creation
> 
> Obtains default scheduler parameters before modifying any settings
> specified
> via domain config.
> 
> Corrected an error for setting sedf parameters (setting .period
> multiple
> times).
> 
> Signed-off-by: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
> 
> diff -r 19aaa30d7fdc -r 953383741ff4 tools/libxl/libxl.h
> --- a/tools/libxl/libxl.h       Tue May 22 10:31:30 2012 +0200
> +++ b/tools/libxl/libxl.h       Tue May 22 11:03:43 2012 +0200
> @@ -605,6 +605,8 @@ int libxl_primary_console_exec(libxl_ctx
>  /* May be called with info_r == NULL to check for domain's existance
> */
>  int libxl_domain_info(libxl_ctx*, libxl_dominfo *info_r,
>                        uint32_t domid);
> +int libxl_sched_set_defaults(libxl_ctx*, uint32_t poolid,
> +                             libxl_sched_params *scparams);

This interface really makes libxl_sched_params differ from all the other
libxl structs (which have a public _init function and an internal
setdefaults function). I'm not really sure its justified either, I was
under the impression that you'd found that there were useful
discriminating values?

If this function was called libxl_sched_init (replacing the
autogenerated one) then it might be ok. Although I'm still not really
sure what the issue is with having a discriminating value meaning
default is, doing that keeps the _init function cheap too.

>  int libxl__sched_set_params(libxl__gc *gc, uint32_t domid,
> libxl_sched_params *scparams)
>  {
>      libxl_ctx *ctx = libxl__gc_owner(gc);
> -    libxl_scheduler sched;
>      libxl_sched_sedf_domain sedf_info;
>      libxl_sched_credit_domain credit_info;
>      libxl_sched_credit2_domain credit2_info;
>      int ret;
>  
> -    sched = libxl_get_scheduler (ctx);
> -    switch (sched) {
> +    switch (scparams->sched) {

What happens if scparams->sched is not the scheduler used for this
domain? Should it either be checked or set somewhere?
> 
> Ian.
> 


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