[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/3] tools: sched: add support for 'null' scheduler
On 17/03/17 18:43, Dario Faggioli wrote: > It being very very basic, also means this scheduler does > not need much support at the tools level (for now). > > Basically, just the definition of the symbol of the > scheduler itself and a couple of stubs. > > Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> > --- > Cc: Wei Liu <wei.liu2@xxxxxxxxxx> > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Cc: George Dunlap <george.dunlap@xxxxxxxxxx> > Cc: Stefano Stabellini <stefano@xxxxxxxxxxx> > Cc: Julien Grall <julien.grall@xxxxxxx> > --- > tools/libxl/libxl.h | 6 ++++++ > tools/libxl/libxl_sched.c | 24 ++++++++++++++++++++++++ > tools/libxl/libxl_types.idl | 1 + > 3 files changed, 31 insertions(+) > > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 4c60e8f..5adac2d 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -210,6 +210,12 @@ > #define LIBXL_HAVE_SCHED_RTDS 1 > > /* > + * LIBXL_HAVE_SCHED_NULL indicates that the 'null' static scheduler > + * is available. > + */ > +#define LIBXL_HAVE_SCHED_NULL 1 > + > +/* > * libxl_domain_build_info has u.hvm.viridian_enable and _disable bitmaps > * of the specified width. > */ > diff --git a/tools/libxl/libxl_sched.c b/tools/libxl/libxl_sched.c > index 84d3837..d44fbe1 100644 > --- a/tools/libxl/libxl_sched.c > +++ b/tools/libxl/libxl_sched.c > @@ -178,6 +178,20 @@ static int sched_arinc653_domain_set(libxl__gc *gc, > uint32_t domid, > return 0; > } > > +static int sched_null_domain_set(libxl__gc *gc, uint32_t domid, > + const libxl_domain_sched_params *scinfo) > +{ > + /* The null scheduler doesn't take any domain-specific parameters. */ > + return 0; > +} > + > +static int sched_null_domain_get(libxl__gc *gc, uint32_t domid, > + libxl_domain_sched_params *scinfo) > +{ > + /* The null scheduler doesn't have any domain-specific parameters. */ > + return ERROR_INVAL; > +} Why the different return value? Why not return either INVAL or SUCCESS for both? -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |