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

[Xen-changelog] Remove broken atropos and round-robin schedulers. Clean up the



ChangeSet 1.1445, 2005/04/04 17:55:15+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Remove broken atropos and round-robin schedulers. Clean up the
        scheduler plugin interface a little.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 b/tools/libxc/Makefile                      |    2 
 b/tools/libxc/xc.h                          |   14 
 b/tools/libxc/xc_domain.c                   |   23 
 b/tools/python/xen/lowlevel/xc/xc.c         |  124 ----
 b/tools/python/xen/xend/XendClient.py       |   13 
 b/tools/python/xen/xend/XendDomain.py       |   18 
 b/tools/python/xen/xend/XendNode.py         |    6 
 b/tools/python/xen/xend/server/SrvDomain.py |   10 
 b/tools/python/xen/xend/server/SrvNode.py   |    6 
 b/tools/python/xen/xend/server/SrvUsbif.py  |   10 
 b/tools/python/xen/xm/main.py               |   34 -
 b/xen/common/Makefile                       |    3 
 b/xen/common/domain.c                       |    7 
 b/xen/common/schedule.c                     |   27 -
 b/xen/include/public/dom0_ops.h             |    2 
 b/xen/include/public/sched_ctl.h            |   70 --
 b/xen/include/xen/sched-if.h                |    4 
 tools/libxc/xc_atropos.c                    |   51 --
 tools/libxc/xc_rrobin.c                     |   37 -
 xen/common/sched_atropos.c                  |  695 ----------------------------
 xen/common/sched_rrobin.c                   |  227 ---------
 21 files changed, 48 insertions(+), 1335 deletions(-)


diff -Nru a/tools/libxc/Makefile b/tools/libxc/Makefile
--- a/tools/libxc/Makefile      2005-04-04 13:05:21 -04:00
+++ b/tools/libxc/Makefile      2005-04-04 13:05:21 -04:00
@@ -16,7 +16,6 @@
 INCLUDES += -I $(XEN_LIBXUTIL)
 
 SRCS     :=
-SRCS     += xc_atropos.c
 SRCS     += xc_bvtsched.c
 SRCS     += xc_domain.c
 SRCS     += xc_evtchn.c
@@ -30,7 +29,6 @@
 SRCS     += xc_physdev.c
 SRCS     += xc_private.c
 SRCS     += xc_ptrace.c
-SRCS     += xc_rrobin.c
 SRCS     += xc_vmx_build.c
 
 CFLAGS   += -Wall
diff -Nru a/tools/libxc/xc.h b/tools/libxc/xc.h
--- a/tools/libxc/xc.h  2005-04-04 13:05:22 -04:00
+++ b/tools/libxc/xc.h  2005-04-04 13:05:22 -04:00
@@ -257,20 +257,6 @@
                            long long *warpl,
                            long long *warpu);
 
-int xc_atropos_domain_set(int xc_handle,
-                          u32 domid,
-                          u64 period, u64 slice, u64 latency,
-                          int xtratime);
-
-int xc_atropos_domain_get(int xc_handle,
-                          u32 domid,
-                          u64* period, u64 *slice, u64 *latency,
-                          int *xtratime);
-
-int xc_rrobin_global_set(int xc_handle, u64 slice);
-
-int xc_rrobin_global_get(int xc_handle, u64 *slice);
-
 typedef evtchn_status_t xc_evtchn_status_t;
 
 /*
diff -Nru a/tools/libxc/xc_atropos.c b/tools/libxc/xc_atropos.c
--- a/tools/libxc/xc_atropos.c  2005-04-04 13:05:22 -04:00
+++ /dev/null   Wed Dec 31 16:00:00 196900
@@ -1,51 +0,0 @@
-/******************************************************************************
- * xc_atropos.c
- * 
- * API for manipulating parameters of the Atropos scheduler.
- * 
- * by Mark Williamson, Copyright (c) 2004 Intel Research Cambridge.
- */
-
-#include "xc_private.h"
-
-int xc_atropos_domain_set(int xc_handle,
-                          u32 domid, u64 period, u64 slice, u64 latency,
-                          int xtratime)
-{
-    dom0_op_t op;
-    struct atropos_adjdom *p = &op.u.adjustdom.u.atropos;
-
-    op.cmd = DOM0_ADJUSTDOM;
-    op.u.adjustdom.domain  = (domid_t)domid;
-    op.u.adjustdom.sched_id = SCHED_ATROPOS;
-    op.u.adjustdom.direction = SCHED_INFO_PUT;
-
-    p->nat_period   = period;
-    p->nat_slice    = slice;
-    p->latency  = latency;
-    p->xtratime = xtratime;
-
-    return do_dom0_op(xc_handle, &op);
-}
-
-int xc_atropos_domain_get(int xc_handle, u32 domid, u64 *period,
-                          u64 *slice, u64 *latency, int *xtratime)
-{
-    dom0_op_t op;
-    int ret;
-    struct atropos_adjdom *p = &op.u.adjustdom.u.atropos;
-
-    op.cmd = DOM0_ADJUSTDOM;    
-    op.u.adjustdom.domain = (domid_t)domid;
-    op.u.adjustdom.sched_id = SCHED_ATROPOS;
-    op.u.adjustdom.direction = SCHED_INFO_GET;
-
-    ret = do_dom0_op(xc_handle, &op);
-
-    *period   = p->nat_period;
-    *slice    = p->nat_slice;
-    *latency  = p->latency;
-    *xtratime = p->xtratime;
-
-    return ret;
-}
diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   2005-04-04 13:05:22 -04:00
+++ b/tools/libxc/xc_domain.c   2005-04-04 13:05:22 -04:00
@@ -177,10 +177,10 @@
     int ret;
     
     /* Figure out which scheduler is currently used: */
-    if((ret = xc_sched_id(xc_handle, &sched_id)))
+    if ( (ret = xc_sched_id(xc_handle, &sched_id)) != 0 )
         return ret;
     
-    switch(sched_id)
+    switch ( sched_id )
     {
         case SCHED_BVT:
         {
@@ -192,28 +192,19 @@
 
             /* Preserve all the scheduling parameters apart 
                of MCU advance. */
-            if((ret = xc_bvtsched_domain_get(xc_handle, domid, &mcuadv, 
-                                &warpback, &warpvalue, &warpl, &warpu)))
+            if ( (ret = xc_bvtsched_domain_get(
+                xc_handle, domid, &mcuadv, 
+                &warpback, &warpvalue, &warpl, &warpu)) != 0 )
                 return ret;
             
             /* The MCU advance is inverse of the weight.
                Default value of the weight is 1, default mcuadv 10.
                The scaling factor is therefore 10. */
-            if(weight > 0) mcuadv = 10 / weight;
+            if ( weight > 0 )
+                mcuadv = 10 / weight;
             
             ret = xc_bvtsched_domain_set(xc_handle, domid, mcuadv, 
                                          warpback, warpvalue, warpl, warpu);
-            break;
-        }
-        
-        case SCHED_RROBIN:
-        {
-            /* The weight cannot be set for RRobin */
-            break;
-        }
-        case SCHED_ATROPOS:
-        {
-            /* TODO - can we set weights in Atropos? */
             break;
         }
     }
diff -Nru a/tools/libxc/xc_rrobin.c b/tools/libxc/xc_rrobin.c
--- a/tools/libxc/xc_rrobin.c   2005-04-04 13:05:22 -04:00
+++ /dev/null   Wed Dec 31 16:00:00 196900
@@ -1,37 +0,0 @@
-/******************************************************************************
- * xc_rrobin.c
- * 
- * API for manipulating parameters of the Round Robin scheduler
- * 
- * by Mark Williamson, Copyright (c) 2004 Intel Research Cambridge.
- */
-
-#include "xc_private.h"
-
-int xc_rrobin_global_set(int xc_handle, u64 slice)
-{
-    dom0_op_t op;
-    op.cmd = DOM0_SCHEDCTL;
-    op.u.schedctl.sched_id = SCHED_RROBIN;
-    op.u.schedctl.direction = SCHED_INFO_PUT;
-
-    op.u.schedctl.u.rrobin.slice = slice;
-    return do_dom0_op(xc_handle, &op);
-}
-
-
-int xc_rrobin_global_get(int xc_handle, u64 *slice)
-{
-    dom0_op_t op;
-    int ret;
-
-    op.cmd = DOM0_SCHEDCTL;
-    op.u.schedctl.sched_id = SCHED_RROBIN;
-    op.u.schedctl.direction = SCHED_INFO_GET;
-
-    ret = do_dom0_op(xc_handle, &op);
-
-    *slice = op.u.schedctl.u.rrobin.slice;
-
-    return ret;
-}
diff -Nru a/tools/python/xen/lowlevel/xc/xc.c 
b/tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c 2005-04-04 13:05:22 -04:00
+++ b/tools/python/xen/lowlevel/xc/xc.c 2005-04-04 13:05:22 -04:00
@@ -800,76 +800,6 @@
                          "cpu_khz",     info.cpu_khz);
 }
 
-static PyObject *pyxc_atropos_domain_set(PyObject *self,
-                                         PyObject *args,
-                                         PyObject *kwds)
-{
-    XcObject *xc = (XcObject *)self;
-    u32 domid;
-    u64 period, slice, latency;
-    int xtratime;
-
-    static char *kwd_list[] = { "dom", "period", "slice", "latency",
-                                "xtratime", NULL };
-    
-    if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLLi", kwd_list, &domid,
-                                     &period, &slice, &latency, &xtratime) )
-        return NULL;
-   
-    if ( xc_atropos_domain_set(xc->xc_handle, domid, period, slice,
-                               latency, xtratime) != 0 )
-        return PyErr_SetFromErrno(xc_error);
-
-    Py_INCREF(zero);
-    return zero;
-}
-
-static PyObject *pyxc_atropos_domain_get(PyObject *self,
-                                         PyObject *args,
-                                         PyObject *kwds)
-{
-    XcObject *xc = (XcObject *)self;
-    u32 domid;
-    u64 period, slice, latency;
-    int xtratime;
-    
-    static char *kwd_list[] = { "dom", NULL };
-
-    if( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, &domid) )
-        return NULL;
-    
-    if ( xc_atropos_domain_get( xc->xc_handle, domid, &period,
-                                &slice, &latency, &xtratime ) )
-        return PyErr_SetFromErrno(xc_error);
-
-    return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i}",
-                         "domain",  domid,
-                         "period",  period,
-                         "slice",   slice,
-                         "latency", latency,
-                         "xtratime", xtratime);
-}
-
-
-static PyObject *pyxc_rrobin_global_set(PyObject *self,
-                                        PyObject *args,
-                                        PyObject *kwds)

_______________________________________________
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®.