[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: Remove redundant xc.domain_setcpuweight() all the way down to libxenctrl.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1202724907 0
# Node ID 49f87f3c2cb8633a516987b7da44945568245e75
# Parent  f8b855ffa4703e8e92e23cb1e642d7457c51d6d0
xend: Remove redundant xc.domain_setcpuweight() all the way down to libxenctrl.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxc/xc_domain.c                 |   15 ---------------
 tools/libxc/xenctrl.h                   |    3 ---
 tools/python/xen/lowlevel/xc/xc.c       |   28 ----------------------------
 tools/python/xen/xend/XendDomainInfo.py |    3 ---
 4 files changed, 49 deletions(-)

diff -r f8b855ffa470 -r 49f87f3c2cb8 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Mon Feb 11 10:06:51 2008 +0000
+++ b/tools/libxc/xc_domain.c   Mon Feb 11 10:15:07 2008 +0000
@@ -348,21 +348,6 @@ int xc_shadow_control(int xc_handle,
         *mb = domctl.u.shadow_op.mb;
 
     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,
diff -r f8b855ffa470 -r 49f87f3c2cb8 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Mon Feb 11 10:06:51 2008 +0000
+++ b/tools/libxc/xenctrl.h     Mon Feb 11 10:15:07 2008 +0000
@@ -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);
diff -r f8b855ffa470 -r 49f87f3c2cb8 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Mon Feb 11 10:06:51 2008 +0000
+++ b/tools/python/xen/lowlevel/xc/xc.c Mon Feb 11 10:15:07 2008 +0000
@@ -231,26 +231,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);
@@ -1323,14 +1303,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", 
diff -r f8b855ffa470 -r 49f87f3c2cb8 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Feb 11 10:06:51 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Feb 11 10:15:07 2008 +0000
@@ -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.

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.