]> xenbits.xensource.com Git - xen.git/commitdiff
xend: Remove redundant xc.domain_setcpuweight() all the way down to libxenctrl.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 11 Feb 2008 10:15:07 +0000 (10:15 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 11 Feb 2008 10:15:07 +0000 (10:15 +0000)
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/libxc/xc_domain.c
tools/libxc/xenctrl.h
tools/python/xen/lowlevel/xc/xc.c
tools/python/xen/xend/XendDomainInfo.py

index f75955c577409673f0dfc2814dcf9daac9b1525e..0f28ed5ca512b56eabec44576393cc3456712174 100644 (file)
@@ -350,21 +350,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,
                         unsigned int max_memkb)
index f6778dd946b5f3fc95dff722e6035442707a8d21..b9e9abd249821070b4574da4c24deafe8e2bc56a 100644 (file)
@@ -380,9 +380,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);
index 425ed7b0fee6021636e1d55dc80827710e57583d..305138bd70559dbecb9c0df6f2a3d8cb2d58d015 100644 (file)
@@ -237,26 +237,6 @@ static PyObject *pyxc_vcpu_setaffinity(XcObject *self,
     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);
-    return zero;
-}
-
 static PyObject *pyxc_domain_sethandle(XcObject *self, PyObject *args)
 {
     int i;
@@ -1325,14 +1305,6 @@ static PyMethodDef pyxc_methods[] = {
       " 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", 
       (PyCFunction)pyxc_domain_sethandle,
       METH_VARARGS, "\n"
index 1e9c1b11f50306af5f81d502abbcbb883fbfcc68..f00ac38ce6e302913eed7ff0487d91fee12baf63 100644 (file)
@@ -1750,9 +1750,6 @@ class XendDomainInfo:
 
             self.image = image.create(self, self.info)
 
-            xc.domain_setcpuweight(self.domid, \
-                                   self.info['vcpus_params']['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.