Remove the related of xc_domain_setcpuweight
PATCH 1/1 Remove the related of xc_domain_setcpuweight
Hi,
I think that the related functions of xc_domain_setcpuweight() is not necessary, because the CPU weight is set by xc_sched_credit_domain_set() when the domain is created.
Signed-off-by Masaki Kanno <[email protected]>
Best regards,
Kan
tools/libxc/xc_domain.c +0 -14
@@ -344,20 +344,6 @@ int xc_shadow_control(int xc_handle,return (rc ==0 ) ? domctl.u.shadow_op.pages : rc; } -int xc_domain_setcpuweight (int xc_handle, -uint32_t domid, -float weight) -{ -int sched_id; -int ret; - -/* Figure out which scheduler is currently used: */ -if ( (ret =xc_sched_id (xc_handle, &sched_id)) !=0 ) -return ret; - -/* No-op. */ -return 0 ; -} int xc_domain_setmaxmem(int xc_handle, uint32_t domid,
tools/libxc/xenctrl.h +0 -3
@@ -374,9 +374,6 @@ int xc_vcpu_getinfo(int xc_handle,uint32_t vcpu, xc_vcpuinfo_t *info); -int xc_domain_setcpuweight (int xc_handle, -uint32_t domid, -float weight);long long xc_domain_get_cpu_usage (int xc_handle,domid_t domid,int vcpu);
tools/python/xen/lowlevel/xc/xc.c +0 -28
@@ -202,26 +202,6 @@ static PyObject *pyxc_vcpu_setaffinity(X }if (xc_vcpu_setaffinity (self->xc_handle, dom, vcpu, cpumap) !=0 ) -return pyxc_error_to_exception (); - -Py_INCREF (zero); -return zero; -} - -static PyObject *pyxc_domain_setcpuweight (XcObject *self, -PyObject *args, -PyObject *kwds) -{ -uint32_t dom; -float cpuweight =1 ; - -static char *kwd_list[] = {"domid" ,"cpuweight" ,NULL }; - -if ( !PyArg_ParseTupleAndKeywords (args, kwds,"i|f" , kwd_list, - &dom, &cpuweight) ) -return NULL ; - -if (xc_domain_setcpuweight (self->xc_handle, dom, cpuweight) !=0 )return pyxc_error_to_exception ();Py_INCREF (zero);
@@ -1087,14 +1067,6 @@ static PyMethodDef pyxc_methods[] = {" dom [int]: Identifier of domain to which VCPU belongs.\n" " vcpu [int, 0]: VCPU being pinned.\n" " cpumap [list, []]: list of usable CPUs.\n\n" - "Returns: [int] 0 on success; -1 on error.\n" }, - - { "domain_setcpuweight", - (PyCFunction )pyxc_domain_setcpuweight, -METH_VARARGS |METH_KEYWORDS ,"\n" -"Set cpuweight scheduler parameter for domain.\n" -" dom [int]: Identifier of domain to be changed.\n" -" cpuweight [float, 1]: VCPU being pinned.\n" "Returns: [int] 0 on success; -1 on error.\n" }, { "domain_sethandle",
tools/python/xen/xend/XendDomainInfo.py +0 -2
@@ -1420,8 +1420,6 @@ class XendDomainInfo: if localtime: xc.domain_set_time_offset(self.domid) - xc.domain_setcpuweight(self.domid, self.info['cpu_weight']) - # repin domain vcpus if a restricted cpus list is provided # this is done prior to memory allocation to aide in memory # distribution for NUMA systems.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel