[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 05 of 10] libxc: Implement SCHEDOP sysctl for credit scheduler
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> diff -r 4ce1812b0249 -r 5e3ca9be617e tools/libxc/xc_csched.c --- a/tools/libxc/xc_csched.c Tue Feb 21 12:14:18 2012 +0000 +++ b/tools/libxc/xc_csched.c Tue Feb 21 12:14:32 2012 +0000 @@ -61,3 +61,47 @@ xc_sched_credit_domain_get( return err; } + +int +xc_sched_credit_param_set( + xc_interface *xch, + uint32_t cpupool_id, + struct xen_sysctl_credit_schedule *schedule) +{ + int rc; + DECLARE_SYSCTL; + + sysctl.cmd = XEN_SYSCTL_scheduler_op; + sysctl.u.scheduler_op.cpupool_id = cpupool_id; + sysctl.u.scheduler_op.sched_id = XEN_SCHEDULER_CREDIT; + sysctl.u.scheduler_op.cmd = XEN_SYSCTL_SCHEDOP_putinfo; + + sysctl.u.scheduler_op.u.sched_credit = *schedule; + + rc = do_sysctl(xch, &sysctl); + + *schedule = sysctl.u.scheduler_op.u.sched_credit; + + return rc; +} + +int +xc_sched_credit_param_get( + xc_interface *xch, + uint32_t cpupool_id, + struct xen_sysctl_credit_schedule *schedule) +{ + int rc; + DECLARE_SYSCTL; + + sysctl.cmd = XEN_SYSCTL_scheduler_op; + sysctl.u.scheduler_op.cpupool_id = cpupool_id; + sysctl.u.scheduler_op.sched_id = XEN_SCHEDULER_CREDIT; + sysctl.u.scheduler_op.cmd = XEN_SYSCTL_SCHEDOP_getinfo; + + rc = do_sysctl(xch, &sysctl); + + *schedule = sysctl.u.scheduler_op.u.sched_credit; + + return rc; +} diff -r 4ce1812b0249 -r 5e3ca9be617e tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h Tue Feb 21 12:14:18 2012 +0000 +++ b/tools/libxc/xenctrl.h Tue Feb 21 12:14:32 2012 +0000 @@ -668,7 +668,12 @@ int xc_sched_credit_domain_set(xc_interf int xc_sched_credit_domain_get(xc_interface *xch, uint32_t domid, struct xen_domctl_sched_credit *sdom); - +int xc_sched_credit_param_set(xc_interface *xch, + uint32_t cpupool_id, + struct xen_sysctl_credit_schedule *schedule); +int xc_sched_credit_param_get(xc_interface *xch, + uint32_t cpupool_id, + struct xen_sysctl_credit_schedule *schedule); int xc_sched_credit2_domain_set(xc_interface *xch, uint32_t domid, struct xen_domctl_sched_credit2 *sdom); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |