[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] sedf parameter setting from dom0 user space...
Hi, I tried to set sedf parameters using domctl hypercall from user space (privcmd interface). If I specify both period and slice and zero out rest (extratime, latency, weight), I get a -1 (error) return value. However, If I specify weight then period and slice values are ignored and default values are assigned and return value is 0. Below is my hypercall code: #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <sys/ioctl.h> #include <sys/types.h> #include <fcntl.h> #include <string.h> #include <xenctrl.h> #include <xen/sys/privcmd.h> int main (int argc, char **argv) { int fd, ret; xen_domctl_t dom; dom.domain = 4; dom.interface_version = XEN_DOMCTL_INTERFACE_VERSION; dom.cmd = XEN_DOMCTL_scheduler_op; dom.u.scheduler_op.sched_id = XEN_SCHEDULER_SEDF; dom.u.scheduler_op.cmd = XEN_DOMCTL_SCHEDOP_putinfo; dom.u.scheduler_op.u.sedf.period = 100; dom.u.scheduler_op.u.sedf.slice = 20; dom.u.scheduler_op.u.sedf.latency = 0; dom.u.scheduler_op.u.sedf.extratime = 0; dom.u.scheduler_op.u.sedf.weight = 0; privcmd_hypercall_t hcall = { __HYPERVISOR_domctl, {(unsigned long)&dom, 0, 0, 0, 0} }; fd = open ("/proc/xen/privcmd", O_RDWR); if (fd <0) printf("in here\n"); else printf("fd = %d\n", fd); ret = ioctl (fd,IOCTL_PRIVCMD_HYPERCALL, &hcall); printf ("ret = %d\n", ret); } Although things work fine from xm tools. Thanks, ~Ashish _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |