[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/3] credit2: libxc related changes to add support for runqueue per cpupool.
libxc receives scheduler specific configuration parametes from libxl. Signed-off-by: Anshul Makkar <anshulmakkar@xxxxxxxxx> --- tools/libxc/include/xenctrl.h | 6 +++++- tools/libxc/xc_cpupool.c | 4 +++- tools/python/xen/lowlevel/xc/xc.c | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 43151cb..e2157e9 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1077,17 +1077,21 @@ typedef struct xc_cpupoolinfo { #define XC_CPUPOOL_POOLID_ANY 0xFFFFFFFF +typedef xen_sysctl_sched_param_t xc_schedparam_t; + /** * Create a new cpupool. * * @parm xc_handle a handle to an open hypervisor interface * @parm ppoolid pointer to the new cpupool id (in/out) * @parm sched_id id of scheduler to use for pool + * @parm sched_param parameter of the scheduler of the cpupool eg. runq for credit2 * return 0 on success, -1 on failure */ int xc_cpupool_create(xc_interface *xch, uint32_t *ppoolid, - uint32_t sched_id); + uint32_t sched_id, + xc_schedparam_t * sched_param); /** * Destroy a cpupool. Pool must be unused and have no cpu assigned. diff --git a/tools/libxc/xc_cpupool.c b/tools/libxc/xc_cpupool.c index fbd8cc9..fb2d183 100644 --- a/tools/libxc/xc_cpupool.c +++ b/tools/libxc/xc_cpupool.c @@ -36,7 +36,8 @@ static int do_sysctl_save(xc_interface *xch, struct xen_sysctl *sysctl) int xc_cpupool_create(xc_interface *xch, uint32_t *ppoolid, - uint32_t sched_id) + uint32_t sched_id, + xc_schedparam_t * sched_params) { int err; DECLARE_SYSCTL; @@ -46,6 +47,7 @@ int xc_cpupool_create(xc_interface *xch, sysctl.u.cpupool_op.cpupool_id = (*ppoolid == XC_CPUPOOL_POOLID_ANY) ? XEN_SYSCTL_CPUPOOL_PAR_ANY : *ppoolid; sysctl.u.cpupool_op.sched_id = sched_id; + sysctl.u.cpupool_op.sched_param = *sched_params; if ( (err = do_sysctl_save(xch, &sysctl)) != 0 ) return err; diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index aa9f8e4..a83a23f 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -1704,6 +1704,7 @@ static PyObject *pyxc_cpupool_create(XcObject *self, PyObject *kwds) { uint32_t cpupool = XC_CPUPOOL_POOLID_ANY, sched = XEN_SCHEDULER_CREDIT; + xc_schedparam_t param; static char *kwd_list[] = { "pool", "sched", NULL }; @@ -1711,7 +1712,7 @@ static PyObject *pyxc_cpupool_create(XcObject *self, &sched)) return NULL; - if ( xc_cpupool_create(self->xc_handle, &cpupool, sched) < 0 ) + if ( xc_cpupool_create(self->xc_handle, &cpupool, sched, ¶m) < 0 ) return pyxc_error_to_exception(self->xc_handle); return PyLongOrInt_FromLong(cpupool); -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |