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

[Xen-devel] [PATCH 07/13] python: remove scheduler related libxc python bindings



Mostly for historical reasons Xen includes Python bindings for libxc.
They have been used by xm/xend in the past but nowadays there is no
user of any scheduler related python binding left. Remove them.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 tools/python/xen/lowlevel/xc/xc.c | 133 --------------------------------------
 1 file changed, 133 deletions(-)

diff --git a/tools/python/xen/lowlevel/xc/xc.c 
b/tools/python/xen/lowlevel/xc/xc.c
index e0f1d7f..6c4ad18 100644
--- a/tools/python/xen/lowlevel/xc/xc.c
+++ b/tools/python/xen/lowlevel/xc/xc.c
@@ -1006,97 +1006,6 @@ static PyObject *pyxc_shadow_mem_control(PyObject *self,
     return Py_BuildValue("i", mbarg);
 }
 
-static PyObject *pyxc_sched_id_get(XcObject *self) {
-    
-    int sched_id;
-    if (xc_sched_id(self->xc_handle, &sched_id) != 0)
-        return PyErr_SetFromErrno(xc_error_obj);
-
-    return Py_BuildValue("i", sched_id);
-}
-
-static PyObject *pyxc_sched_credit_domain_set(XcObject *self,
-                                              PyObject *args,
-                                              PyObject *kwds)
-{
-    uint32_t domid;
-    uint16_t weight;
-    uint16_t cap;
-    static char *kwd_list[] = { "domid", "weight", "cap", NULL };
-    static char kwd_type[] = "I|HH";
-    struct xen_domctl_sched_credit sdom;
-    
-    weight = 0;
-    cap = (uint16_t)~0U;
-    if( !PyArg_ParseTupleAndKeywords(args, kwds, kwd_type, kwd_list, 
-                                     &domid, &weight, &cap) )
-        return NULL;
-
-    sdom.weight = weight;
-    sdom.cap = cap;
-
-    if ( xc_sched_credit_domain_set(self->xc_handle, domid, &sdom) != 0 )
-        return pyxc_error_to_exception(self->xc_handle);
-
-    Py_INCREF(zero);
-    return zero;
-}
-
-static PyObject *pyxc_sched_credit_domain_get(XcObject *self, PyObject *args)
-{
-    uint32_t domid;
-    struct xen_domctl_sched_credit sdom;
-    
-    if( !PyArg_ParseTuple(args, "I", &domid) )
-        return NULL;
-    
-    if ( xc_sched_credit_domain_get(self->xc_handle, domid, &sdom) != 0 )
-        return pyxc_error_to_exception(self->xc_handle);
-
-    return Py_BuildValue("{s:H,s:H}",
-                         "weight",  sdom.weight,
-                         "cap",     sdom.cap);
-}
-
-static PyObject *pyxc_sched_credit2_domain_set(XcObject *self,
-                                              PyObject *args,
-                                              PyObject *kwds)
-{
-    uint32_t domid;
-    uint16_t weight;
-    static char *kwd_list[] = { "domid", "weight", NULL };
-    static char kwd_type[] = "I|H";
-    struct xen_domctl_sched_credit2 sdom;
-
-    weight = 0;
-    if( !PyArg_ParseTupleAndKeywords(args, kwds, kwd_type, kwd_list,
-                                     &domid, &weight) )
-        return NULL;
-
-    sdom.weight = weight;
-
-    if ( xc_sched_credit2_domain_set(self->xc_handle, domid, &sdom) != 0 )
-        return pyxc_error_to_exception(self->xc_handle);
-
-    Py_INCREF(zero);
-    return zero;
-}
-
-static PyObject *pyxc_sched_credit2_domain_get(XcObject *self, PyObject *args)
-{
-    uint32_t domid;
-    struct xen_domctl_sched_credit2 sdom;
-
-    if( !PyArg_ParseTuple(args, "I", &domid) )
-        return NULL;
-
-    if ( xc_sched_credit2_domain_get(self->xc_handle, domid, &sdom) != 0 )
-        return pyxc_error_to_exception(self->xc_handle);
-
-    return Py_BuildValue("{s:H}",
-                         "weight",  sdom.weight);
-}
-
 static PyObject *pyxc_domain_setmaxmem(XcObject *self, PyObject *args)
 {
     uint32_t dom;
@@ -1545,48 +1454,6 @@ static PyMethodDef pyxc_methods[] = {
       " value   [long]:     Value of param.\n"
       "Returns: [int] 0 on success.\n" },
 
-    { "sched_id_get",
-      (PyCFunction)pyxc_sched_id_get,
-      METH_NOARGS, "\n"
-      "Get the current scheduler type in use.\n"
-      "Returns: [int] sched_id.\n" },    
-
-    { "sched_credit_domain_set",
-      (PyCFunction)pyxc_sched_credit_domain_set,
-      METH_KEYWORDS, "\n"
-      "Set the scheduling parameters for a domain when running with the\n"
-      "SMP credit scheduler.\n"
-      " domid     [int]:   domain id to set\n"
-      " weight    [short]: domain's scheduling weight\n"
-      "Returns: [int] 0 on success; -1 on error.\n" },
-
-    { "sched_credit_domain_get",
-      (PyCFunction)pyxc_sched_credit_domain_get,
-      METH_VARARGS, "\n"
-      "Get the scheduling parameters for a domain when running with the\n"
-      "SMP credit scheduler.\n"
-      " domid     [int]:   domain id to get\n"
-      "Returns:   [dict]\n"
-      " weight    [short]: domain's scheduling weight\n"},
-
-    { "sched_credit2_domain_set",
-      (PyCFunction)pyxc_sched_credit2_domain_set,
-      METH_KEYWORDS, "\n"
-      "Set the scheduling parameters for a domain when running with the\n"
-      "SMP credit2 scheduler.\n"
-      " domid     [int]:   domain id to set\n"
-      " weight    [short]: domain's scheduling weight\n"
-      "Returns: [int] 0 on success; -1 on error.\n" },
-
-    { "sched_credit2_domain_get",
-      (PyCFunction)pyxc_sched_credit2_domain_get,
-      METH_VARARGS, "\n"
-      "Get the scheduling parameters for a domain when running with the\n"
-      "SMP credit2 scheduler.\n"
-      " domid     [int]:   domain id to get\n"
-      "Returns:   [dict]\n"
-      " weight    [short]: domain's scheduling weight\n"},
-
     { "evtchn_alloc_unbound", 
       (PyCFunction)pyxc_evtchn_alloc_unbound,
       METH_VARARGS | METH_KEYWORDS, "\n"
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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