ia64/xen-unstable
changeset 4457:3a5bddf34b1c
bitkeeper revision 1.1236.1.209 (42517173PR-QieAWB-SNd4qnSxKmMQ)
Remove broken atropos and round-robin schedulers. Clean up the
scheduler plugin interface a little.
Signed-off-by: Keir Fraser <keir@xensource.com>
Remove broken atropos and round-robin schedulers. Clean up the
scheduler plugin interface a little.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Mon Apr 04 16:55:15 2005 +0000 (2005-04-04) |
parents | be9687d4b0e8 |
children | 0ccbf878a1d1 |
files | .rootkeys tools/libxc/Makefile tools/libxc/xc.h tools/libxc/xc_atropos.c tools/libxc/xc_domain.c tools/libxc/xc_rrobin.c tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/XendClient.py tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendNode.py tools/python/xen/xend/server/SrvDomain.py tools/python/xen/xend/server/SrvNode.py tools/python/xen/xend/server/SrvUsbif.py tools/python/xen/xm/main.py xen/common/Makefile xen/common/domain.c xen/common/sched_atropos.c xen/common/sched_rrobin.c xen/common/schedule.c xen/include/public/dom0_ops.h xen/include/public/sched_ctl.h xen/include/xen/sched-if.h |
line diff
1.1 --- a/.rootkeys Mon Apr 04 16:09:46 2005 +0000 1.2 +++ b/.rootkeys Mon Apr 04 16:55:15 2005 +0000 1.3 @@ -712,7 +712,6 @@ 41dde8afKYRKxS4XtLv1KUegGQy_bg tools/lib 1.4 41cc934abX-QLXJXW_clV_wRjM0zYg tools/libxc/plan9a.out.h 1.5 3fbba6dc1uU7U3IFeF6A-XEOYF2MkQ tools/libxc/rpm.spec 1.6 3fbba6dcrNxtygEcgJYAJJ1gCQqfsA tools/libxc/xc.h 1.7 -40589968oCfoUlXd460CjVAkBE8IBA tools/libxc/xc_atropos.c 1.8 3fbba6dbEVkVMX0JuDFzap9jeaucGA tools/libxc/xc_bvtsched.c 1.9 3fbba6dbasJQV-MVElDC0DGSHMiL5w tools/libxc/xc_domain.c 1.10 40278d99BLsfUv3qxv0I8C1sClZ0ow tools/libxc/xc_elf.h 1.11 @@ -729,7 +728,6 @@ 41cc934aO1m6NxEh_8eDr9bJIMoLFA tools/lib 1.12 3fbba6dctWRWlFJkYb6hdix2X4WMuw tools/libxc/xc_private.c 1.13 3fbba6dcbVrG2hPzEzwdeV_UC8kydQ tools/libxc/xc_private.h 1.14 42337174PxyzzPk62raDiYCIsfStDg tools/libxc/xc_ptrace.c 1.15 -40589968UQFnJeOMn8UIFLbXBuwXjw tools/libxc/xc_rrobin.c 1.16 41dde8b0pLfAKMs_L9Uri2hnzHiCRQ tools/libxc/xc_vmx_build.c 1.17 40e1b09dMYB4ItGCqcMIzirdMd9I-w tools/libxutil/Makefile 1.18 40e033325Sjqs-_4TuzeUEprP_gYFg tools/libxutil/allocate.c 1.19 @@ -1208,9 +1206,7 @@ 3ddb79bdD4SLmmdMD7yLW5HcUWucXw xen/commo 1.20 3e54c38dkHAev597bPr71-hGzTdocg xen/common/perfc.c 1.21 4051bcecFeq4DE70p4zGO5setf47CA xen/common/physdev.c 1.22 3ddb79bdHqdQpATqC0rmUZNbsb6L6A xen/common/resource.c 1.23 -4064773cJ31vZt-zhbSoxqft1Jaw0w xen/common/sched_atropos.c 1.24 40589968dD2D1aejwSOvrROg7fOvGQ xen/common/sched_bvt.c 1.25 -40589968be_t_n0-w6ggceW7h-sx0w xen/common/sched_rrobin.c 1.26 3e397e6619PgAfBbw2XFbXkewvUWgw xen/common/schedule.c 1.27 3ddb79bd0gVQYmL2zvuJnldvD0AGxQ xen/common/softirq.c 1.28 3e7f358awXBC3Vw-wFRwPw18qL1khg xen/common/string.c
2.1 --- a/tools/libxc/Makefile Mon Apr 04 16:09:46 2005 +0000 2.2 +++ b/tools/libxc/Makefile Mon Apr 04 16:55:15 2005 +0000 2.3 @@ -16,7 +16,6 @@ vpath %c $(XEN_LIBXUTIL) 2.4 INCLUDES += -I $(XEN_LIBXUTIL) 2.5 2.6 SRCS := 2.7 -SRCS += xc_atropos.c 2.8 SRCS += xc_bvtsched.c 2.9 SRCS += xc_domain.c 2.10 SRCS += xc_evtchn.c 2.11 @@ -30,7 +29,6 @@ SRCS += xc_misc.c 2.12 SRCS += xc_physdev.c 2.13 SRCS += xc_private.c 2.14 SRCS += xc_ptrace.c 2.15 -SRCS += xc_rrobin.c 2.16 SRCS += xc_vmx_build.c 2.17 2.18 CFLAGS += -Wall
3.1 --- a/tools/libxc/xc.h Mon Apr 04 16:09:46 2005 +0000 3.2 +++ b/tools/libxc/xc.h Mon Apr 04 16:55:15 2005 +0000 3.3 @@ -257,20 +257,6 @@ int xc_bvtsched_domain_get(int xc_handle 3.4 long long *warpl, 3.5 long long *warpu); 3.6 3.7 -int xc_atropos_domain_set(int xc_handle, 3.8 - u32 domid, 3.9 - u64 period, u64 slice, u64 latency, 3.10 - int xtratime); 3.11 - 3.12 -int xc_atropos_domain_get(int xc_handle, 3.13 - u32 domid, 3.14 - u64* period, u64 *slice, u64 *latency, 3.15 - int *xtratime); 3.16 - 3.17 -int xc_rrobin_global_set(int xc_handle, u64 slice); 3.18 - 3.19 -int xc_rrobin_global_get(int xc_handle, u64 *slice); 3.20 - 3.21 typedef evtchn_status_t xc_evtchn_status_t; 3.22 3.23 /*
4.1 --- a/tools/libxc/xc_atropos.c Mon Apr 04 16:09:46 2005 +0000 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,51 +0,0 @@ 4.4 -/****************************************************************************** 4.5 - * xc_atropos.c 4.6 - * 4.7 - * API for manipulating parameters of the Atropos scheduler. 4.8 - * 4.9 - * by Mark Williamson, Copyright (c) 2004 Intel Research Cambridge. 4.10 - */ 4.11 - 4.12 -#include "xc_private.h" 4.13 - 4.14 -int xc_atropos_domain_set(int xc_handle, 4.15 - u32 domid, u64 period, u64 slice, u64 latency, 4.16 - int xtratime) 4.17 -{ 4.18 - dom0_op_t op; 4.19 - struct atropos_adjdom *p = &op.u.adjustdom.u.atropos; 4.20 - 4.21 - op.cmd = DOM0_ADJUSTDOM; 4.22 - op.u.adjustdom.domain = (domid_t)domid; 4.23 - op.u.adjustdom.sched_id = SCHED_ATROPOS; 4.24 - op.u.adjustdom.direction = SCHED_INFO_PUT; 4.25 - 4.26 - p->nat_period = period; 4.27 - p->nat_slice = slice; 4.28 - p->latency = latency; 4.29 - p->xtratime = xtratime; 4.30 - 4.31 - return do_dom0_op(xc_handle, &op); 4.32 -} 4.33 - 4.34 -int xc_atropos_domain_get(int xc_handle, u32 domid, u64 *period, 4.35 - u64 *slice, u64 *latency, int *xtratime) 4.36 -{ 4.37 - dom0_op_t op; 4.38 - int ret; 4.39 - struct atropos_adjdom *p = &op.u.adjustdom.u.atropos; 4.40 - 4.41 - op.cmd = DOM0_ADJUSTDOM; 4.42 - op.u.adjustdom.domain = (domid_t)domid; 4.43 - op.u.adjustdom.sched_id = SCHED_ATROPOS; 4.44 - op.u.adjustdom.direction = SCHED_INFO_GET; 4.45 - 4.46 - ret = do_dom0_op(xc_handle, &op); 4.47 - 4.48 - *period = p->nat_period; 4.49 - *slice = p->nat_slice; 4.50 - *latency = p->latency; 4.51 - *xtratime = p->xtratime; 4.52 - 4.53 - return ret; 4.54 -}
5.1 --- a/tools/libxc/xc_domain.c Mon Apr 04 16:09:46 2005 +0000 5.2 +++ b/tools/libxc/xc_domain.c Mon Apr 04 16:55:15 2005 +0000 5.3 @@ -177,10 +177,10 @@ int xc_domain_setcpuweight(int xc_handle 5.4 int ret; 5.5 5.6 /* Figure out which scheduler is currently used: */ 5.7 - if((ret = xc_sched_id(xc_handle, &sched_id))) 5.8 + if ( (ret = xc_sched_id(xc_handle, &sched_id)) != 0 ) 5.9 return ret; 5.10 5.11 - switch(sched_id) 5.12 + switch ( sched_id ) 5.13 { 5.14 case SCHED_BVT: 5.15 { 5.16 @@ -192,30 +192,21 @@ int xc_domain_setcpuweight(int xc_handle 5.17 5.18 /* Preserve all the scheduling parameters apart 5.19 of MCU advance. */ 5.20 - if((ret = xc_bvtsched_domain_get(xc_handle, domid, &mcuadv, 5.21 - &warpback, &warpvalue, &warpl, &warpu))) 5.22 + if ( (ret = xc_bvtsched_domain_get( 5.23 + xc_handle, domid, &mcuadv, 5.24 + &warpback, &warpvalue, &warpl, &warpu)) != 0 ) 5.25 return ret; 5.26 5.27 /* The MCU advance is inverse of the weight. 5.28 Default value of the weight is 1, default mcuadv 10. 5.29 The scaling factor is therefore 10. */ 5.30 - if(weight > 0) mcuadv = 10 / weight; 5.31 + if ( weight > 0 ) 5.32 + mcuadv = 10 / weight; 5.33 5.34 ret = xc_bvtsched_domain_set(xc_handle, domid, mcuadv, 5.35 warpback, warpvalue, warpl, warpu); 5.36 break; 5.37 } 5.38 - 5.39 - case SCHED_RROBIN: 5.40 - { 5.41 - /* The weight cannot be set for RRobin */ 5.42 - break; 5.43 - } 5.44 - case SCHED_ATROPOS: 5.45 - { 5.46 - /* TODO - can we set weights in Atropos? */ 5.47 - break; 5.48 - } 5.49 } 5.50 5.51 return ret;
6.1 --- a/tools/libxc/xc_rrobin.c Mon Apr 04 16:09:46 2005 +0000 6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 6.3 @@ -1,37 +0,0 @@ 6.4 -/****************************************************************************** 6.5 - * xc_rrobin.c 6.6 - * 6.7 - * API for manipulating parameters of the Round Robin scheduler 6.8 - * 6.9 - * by Mark Williamson, Copyright (c) 2004 Intel Research Cambridge. 6.10 - */ 6.11 - 6.12 -#include "xc_private.h" 6.13 - 6.14 -int xc_rrobin_global_set(int xc_handle, u64 slice) 6.15 -{ 6.16 - dom0_op_t op; 6.17 - op.cmd = DOM0_SCHEDCTL; 6.18 - op.u.schedctl.sched_id = SCHED_RROBIN; 6.19 - op.u.schedctl.direction = SCHED_INFO_PUT; 6.20 - 6.21 - op.u.schedctl.u.rrobin.slice = slice; 6.22 - return do_dom0_op(xc_handle, &op); 6.23 -} 6.24 - 6.25 - 6.26 -int xc_rrobin_global_get(int xc_handle, u64 *slice) 6.27 -{ 6.28 - dom0_op_t op; 6.29 - int ret; 6.30 - 6.31 - op.cmd = DOM0_SCHEDCTL; 6.32 - op.u.schedctl.sched_id = SCHED_RROBIN; 6.33 - op.u.schedctl.direction = SCHED_INFO_GET; 6.34 - 6.35 - ret = do_dom0_op(xc_handle, &op); 6.36 - 6.37 - *slice = op.u.schedctl.u.rrobin.slice; 6.38 - 6.39 - return ret; 6.40 -}
7.1 --- a/tools/python/xen/lowlevel/xc/xc.c Mon Apr 04 16:09:46 2005 +0000 7.2 +++ b/tools/python/xen/lowlevel/xc/xc.c Mon Apr 04 16:55:15 2005 +0000 7.3 @@ -800,76 +800,6 @@ static PyObject *pyxc_physinfo(PyObject 7.4 "cpu_khz", info.cpu_khz); 7.5 } 7.6 7.7 -static PyObject *pyxc_atropos_domain_set(PyObject *self, 7.8 - PyObject *args, 7.9 - PyObject *kwds) 7.10 -{ 7.11 - XcObject *xc = (XcObject *)self; 7.12 - u32 domid; 7.13 - u64 period, slice, latency; 7.14 - int xtratime; 7.15 - 7.16 - static char *kwd_list[] = { "dom", "period", "slice", "latency", 7.17 - "xtratime", NULL }; 7.18 - 7.19 - if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLLi", kwd_list, &domid, 7.20 - &period, &slice, &latency, &xtratime) ) 7.21 - return NULL; 7.22 - 7.23 - if ( xc_atropos_domain_set(xc->xc_handle, domid, period, slice, 7.24 - latency, xtratime) != 0 ) 7.25 - return PyErr_SetFromErrno(xc_error); 7.26 - 7.27 - Py_INCREF(zero); 7.28 - return zero; 7.29 -} 7.30 - 7.31 -static PyObject *pyxc_atropos_domain_get(PyObject *self, 7.32 - PyObject *args, 7.33 - PyObject *kwds) 7.34 -{ 7.35 - XcObject *xc = (XcObject *)self; 7.36 - u32 domid; 7.37 - u64 period, slice, latency; 7.38 - int xtratime; 7.39 - 7.40 - static char *kwd_list[] = { "dom", NULL }; 7.41 - 7.42 - if( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, &domid) ) 7.43 - return NULL; 7.44 - 7.45 - if ( xc_atropos_domain_get( xc->xc_handle, domid, &period, 7.46 - &slice, &latency, &xtratime ) ) 7.47 - return PyErr_SetFromErrno(xc_error); 7.48 - 7.49 - return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i}", 7.50 - "domain", domid, 7.51 - "period", period, 7.52 - "slice", slice, 7.53 - "latency", latency, 7.54 - "xtratime", xtratime); 7.55 -} 7.56 - 7.57 - 7.58 -static PyObject *pyxc_rrobin_global_set(PyObject *self, 7.59 - PyObject *args, 7.60 - PyObject *kwds) 7.61 -{ 7.62 - XcObject *xc = (XcObject *)self; 7.63 - u64 slice; 7.64 - 7.65 - static char *kwd_list[] = { "slice", NULL }; 7.66 - 7.67 - if( !PyArg_ParseTupleAndKeywords(args, kwds, "L", kwd_list, &slice) ) 7.68 - return NULL; 7.69 - 7.70 - if ( xc_rrobin_global_set(xc->xc_handle, slice) != 0 ) 7.71 - return PyErr_SetFromErrno(xc_error); 7.72 - 7.73 - Py_INCREF(zero); 7.74 - return zero; 7.75 -} 7.76 - 7.77 static PyObject *pyxc_shadow_control(PyObject *self, 7.78 PyObject *args, 7.79 PyObject *kwds) 7.80 @@ -892,22 +822,6 @@ static PyObject *pyxc_shadow_control(PyO 7.81 return zero; 7.82 } 7.83 7.84 -static PyObject *pyxc_rrobin_global_get(PyObject *self, 7.85 - PyObject *args, 7.86 - PyObject *kwds) 7.87 -{ 7.88 - XcObject *xc = (XcObject *)self; 7.89 - u64 slice; 7.90 - 7.91 - if ( !PyArg_ParseTuple(args, "") ) 7.92 - return NULL; 7.93 - 7.94 - if ( xc_rrobin_global_get(xc->xc_handle, &slice) != 0 ) 7.95 - return PyErr_SetFromErrno(xc_error); 7.96 - 7.97 - return Py_BuildValue("{s:L}", "slice", slice); 7.98 -} 7.99 - 7.100 static PyObject *pyxc_domain_setmaxmem(PyObject *self, 7.101 PyObject *args, 7.102 PyObject *kwds) 7.103 @@ -1079,44 +993,6 @@ static PyMethodDef pyxc_methods[] = { 7.104 " warpl [long]: Warp limit,\n" 7.105 }, 7.106 7.107 - { "atropos_domain_set", 7.108 - (PyCFunction)pyxc_atropos_domain_set, 7.109 - METH_KEYWORDS, "\n" 7.110 - "Set the scheduling parameters for a domain when running with Atropos.\n" 7.111 - " dom [int]: domain to set\n" 7.112 - " period [long]: domain's scheduling period\n" 7.113 - " slice [long]: domain's slice per period\n" 7.114 - " latency [long]: wakeup latency hint\n" 7.115 - " xtratime [int]: boolean\n" 7.116 - "Returns: [int] 0 on success; -1 on error.\n" }, 7.117 - 7.118 - { "atropos_domain_get", 7.119 - (PyCFunction)pyxc_atropos_domain_get, 7.120 - METH_KEYWORDS, "\n" 7.121 - "Get the current scheduling parameters for a domain when running with\n" 7.122 - "the Atropos scheduler." 7.123 - " dom [int]: domain to query\n" 7.124 - "Returns: [dict]\n" 7.125 - " domain [int]: domain ID\n" 7.126 - " period [long]: scheduler period\n" 7.127 - " slice [long]: CPU reservation per period\n" 7.128 - " latency [long]: unblocking latency hint\n" 7.129 - " xtratime [int] : 0 if not using slack time, nonzero otherwise\n" }, 7.130 - 7.131 - { "rrobin_global_set", 7.132 - (PyCFunction)pyxc_rrobin_global_set, 7.133 - METH_KEYWORDS, "\n" 7.134 - "Set Round Robin scheduler slice.\n" 7.135 - " slice [long]: Round Robin scheduler slice\n" 7.136 - "Returns: [int] 0 on success, throws an exception on failure\n" }, 7.137 - 7.138 - { "rrobin_global_get", 7.139 - (PyCFunction)pyxc_rrobin_global_get, 7.140 - METH_KEYWORDS, "\n" 7.141 - "Get Round Robin scheduler settings\n" 7.142 - "Returns [dict]:\n" 7.143 - " slice [long]: Scheduler time slice.\n" }, 7.144 - 7.145 { "evtchn_alloc_unbound", 7.146 (PyCFunction)pyxc_evtchn_alloc_unbound, 7.147 METH_VARARGS | METH_KEYWORDS, "\n"
8.1 --- a/tools/python/xen/xend/XendClient.py Mon Apr 04 16:09:46 2005 +0000 8.2 +++ b/tools/python/xen/xend/XendClient.py Mon Apr 04 16:55:15 2005 +0000 8.3 @@ -189,11 +189,6 @@ class Xend: 8.4 def xend_node_log(self): 8.5 return self.xendGet(self.nodeurl('log')) 8.6 8.7 - def xend_node_cpu_rrobin_slice_set(self, slice): 8.8 - return self.xendPost(self.nodeurl(), 8.9 - {'op' : 'cpu_rrobin_slice_set', 8.10 - 'slice' : slice }) 8.11 - 8.12 def xend_node_cpu_bvt_slice_set(self, ctx_allow): 8.13 return self.xendPost(self.nodeurl(), 8.14 {'op' : 'cpu_bvt_slice_set', 8.15 @@ -265,14 +260,6 @@ class Xend: 8.16 'warpl' : warpl, 8.17 'warpu' : warpu }) 8.18 8.19 - def xend_domain_cpu_atropos_set(self, id, period, slice, latency, xtratime): 8.20 - return self.xendPost(self.domainurl(id), 8.21 - {'op' : 'cpu_atropos_set', 8.22 - 'period' : period, 8.23 - 'slice' : slice, 8.24 - 'latency' : latency, 8.25 - 'xtratime': xtratime }) 8.26 - 8.27 def xend_domain_maxmem_set(self, id, memory): 8.28 return self.xendPost(self.domainurl(id), 8.29 { 'op' : 'maxmem_set',
9.1 --- a/tools/python/xen/xend/XendDomain.py Mon Apr 04 16:09:46 2005 +0000 9.2 +++ b/tools/python/xen/xend/XendDomain.py Mon Apr 04 16:55:15 2005 +0000 9.3 @@ -642,24 +642,6 @@ class XendDomain: 9.4 except Exception, ex: 9.5 raise XendError(str(ex)) 9.6 9.7 - def domain_cpu_atropos_set(self, id, period, slice, latency, xtratime): 9.8 - """Set Atropos scheduler parameters for a domain. 9.9 - """ 9.10 - dominfo = self.domain_lookup(id) 9.11 - try: 9.12 - return xc.atropos_domain_set(dominfo.dom, period, slice, latency, xtratime) 9.13 - except Exception, ex: 9.14 - raise XendError(str(ex)) 9.15 - 9.16 - def domain_cpu_atropos_get(self, id): 9.17 - """Get Atropos scheduler parameters for a domain. 9.18 - """ 9.19 - dominfo = self.domain_lookup(id) 9.20 - try: 9.21 - return xc.atropos_domain_get(dominfo.dom) 9.22 - except Exception, ex: 9.23 - raise XendError(str(ex)) 9.24 - 9.25 def domain_device_create(self, id, devconfig): 9.26 """Create a new device for a domain. 9.27
10.1 --- a/tools/python/xen/xend/XendNode.py Mon Apr 04 16:09:46 2005 +0000 10.2 +++ b/tools/python/xen/xend/XendNode.py Mon Apr 04 16:55:15 2005 +0000 10.3 @@ -30,12 +30,6 @@ class XendNode: 10.4 def cpu_bvt_slice_get(self): 10.5 return self.xc.bvtsched_global_get() 10.6 10.7 - def cpu_rrobin_slice_set(self, slice): 10.8 - return self.xc.rrobin_global_set(slice=slice) 10.9 - 10.10 - def cpu_rrobin_slice_get(self): 10.11 - return self.xc.rrobin_global_get() 10.12 - 10.13 def info(self): 10.14 return self.nodeinfo() + self.physinfo() 10.15
11.1 --- a/tools/python/xen/xend/server/SrvDomain.py Mon Apr 04 16:09:46 2005 +0000 11.2 +++ b/tools/python/xen/xend/server/SrvDomain.py Mon Apr 04 16:55:15 2005 +0000 11.3 @@ -107,16 +107,6 @@ class SrvDomain(SrvDir): 11.4 val = fn(req.args, {'dom': self.dom.id}) 11.5 return val 11.6 11.7 - def op_cpu_atropos_set(self, op, req): 11.8 - fn = FormFn(self.xd.domain_cpu_atropos_set, 11.9 - [['dom', 'str'], 11.10 - ['period', 'int'], 11.11 - ['slice', 'int'], 11.12 - ['latency', 'int'], 11.13 - ['xtratime', 'int']]) 11.14 - val = fn(req.args, {'dom': self.dom.id}) 11.15 - return val 11.16 - 11.17 def op_maxmem_set(self, op, req): 11.18 fn = FormFn(self.xd.domain_maxmem_set, 11.19 [['dom', 'str'],
12.1 --- a/tools/python/xen/xend/server/SrvNode.py Mon Apr 04 16:09:46 2005 +0000 12.2 +++ b/tools/python/xen/xend/server/SrvNode.py Mon Apr 04 16:55:15 2005 +0000 12.3 @@ -25,12 +25,6 @@ class SrvNode(SrvDir): 12.4 val = self.xn.reboot() 12.5 return val 12.6 12.7 - def op_cpu_rrobin_slice_set(self, op, req): 12.8 - fn = FormFn(self.xn.cpu_rrobin_slice_set, 12.9 - [['slice', 'int']]) 12.10 - val = fn(req.args, {}) 12.11 - return val 12.12 - 12.13 def op_cpu_bvt_slice_set(self, op, req): 12.14 fn = FormFn(self.xn.cpu_bvt_slice_set, 12.15 [['ctx_allow', 'int']])
13.1 --- a/tools/python/xen/xend/server/SrvUsbif.py Mon Apr 04 16:09:46 2005 +0000 13.2 +++ b/tools/python/xen/xend/server/SrvUsbif.py Mon Apr 04 16:55:15 2005 +0000 13.3 @@ -132,16 +132,6 @@ class SrvDomain(SrvDir): 13.4 val = fn(req.args, {'dom': self.dom.id}) 13.5 return val 13.6 13.7 - def op_cpu_atropos_set(self, op, req): 13.8 - fn = FormFn(self.xd.domain_cpu_atropos_set, 13.9 - [['dom', 'str'], 13.10 - ['period', 'int'], 13.11 - ['slice', 'int'], 13.12 - ['latency', 'int'], 13.13 - ['xtratime', 'int']]) 13.14 - val = fn(req.args, {'dom': self.dom.id}) 13.15 - return val 13.16 - 13.17 def op_maxmem_set(self, op, req): 13.18 fn = FormFn(self.xd.domain_maxmem_set, 13.19 [['dom', 'str'],
14.1 --- a/tools/python/xen/xm/main.py Mon Apr 04 16:09:46 2005 +0000 14.2 +++ b/tools/python/xen/xm/main.py Mon Apr 04 16:55:15 2005 +0000 14.3 @@ -566,40 +566,6 @@ class ProgBvtslice(Prog): 14.4 14.5 xm.prog(ProgBvtslice) 14.6 14.7 - 14.8 -class ProgAtropos(Prog): 14.9 - group = 'scheduler' 14.10 - name= "atropos" 14.11 - info = """Set atropos parameters.""" 14.12 - 14.13 - def help(self, args): 14.14 - print args[0], "DOM PERIOD SLICE LATENCY XTRATIME" 14.15 - print "\nSet atropos parameters." 14.16 - 14.17 - def main(self, args): 14.18 - if len(args) != 6: self.err("%s: Invalid argument(s)" % args[0]) 14.19 - dom = args[1] 14.20 - v = map(int, args[2:6]) 14.21 - server.xend_domain_cpu_atropos_set(dom, *v) 14.22 - 14.23 -xm.prog(ProgAtropos) 14.24 - 14.25 -class ProgRrobin(Prog): 14.26 - group = 'scheduler' 14.27 - name = "rrobin" 14.28 - info = """Set round robin slice.""" 14.29 - 14.30 - def help(self, args): 14.31 - print args[0], "SLICE" 14.32 - print "\nSet round robin scheduler slice." 14.33 - 14.34 - def main(self, args): 14.35 - if len(args) != 2: self.err("%s: Invalid argument(s)" % args[0]) 14.36 - rrslice = int(args[1]) 14.37 - server.xend_node_rrobin_set(rrslice) 14.38 - 14.39 -xm.prog(ProgRrobin) 14.40 - 14.41 class ProgInfo(Prog): 14.42 group = 'host' 14.43 name = "info"
15.1 --- a/xen/common/Makefile Mon Apr 04 16:09:46 2005 +0000 15.2 +++ b/xen/common/Makefile Mon Apr 04 16:55:15 2005 +0000 15.3 @@ -15,9 +15,6 @@ ifneq ($(trace),y) 15.4 OBJS := $(subst trace.o,,$(OBJS)) 15.5 endif 15.6 15.7 -OBJS := $(subst sched_atropos.o,,$(OBJS)) 15.8 -OBJS := $(subst sched_rrobin.o,,$(OBJS)) 15.9 - 15.10 default: common.o 15.11 common.o: $(OBJS) 15.12 $(LD) $(LDFLAGS) -r -o common.o $(OBJS)
16.1 --- a/xen/common/domain.c Mon Apr 04 16:09:46 2005 +0000 16.2 +++ b/xen/common/domain.c Mon Apr 04 16:55:15 2005 +0000 16.3 @@ -326,13 +326,10 @@ long do_boot_vcpu(unsigned long vcpu, fu 16.4 16.5 arch_do_boot_vcpu(ed); 16.6 16.7 - sched_add_domain(ed); 16.8 + if ( (rc = arch_set_info_guest(ed, c)) != 0 ) 16.9 + goto out; 16.10 16.11 - if ( (rc = arch_set_info_guest(ed, c)) != 0 ) 16.12 - { 16.13 - sched_rem_domain(ed); 16.14 - goto out; 16.15 - } 16.16 + sched_add_domain(ed); 16.17 16.18 /* domain_unpause_by_systemcontroller */ 16.19 if ( test_and_clear_bit(EDF_CTRLPAUSE, &ed->ed_flags) )
17.1 --- a/xen/common/sched_atropos.c Mon Apr 04 16:09:46 2005 +0000 17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 17.3 @@ -1,695 +0,0 @@ 17.4 -/* 17.5 - * atropos.c 17.6 - * --------- 17.7 - * 17.8 - * Copyright (c) 1994 University of Cambridge Computer Laboratory. 17.9 - * This is part of Nemesis; consult your contract for terms and conditions. 17.10 - * 17.11 - * ID : $Id: atropos.c 1.1 Tue, 13 Apr 1999 13:30:49 +0100 dr10009 $ 17.12 - * 17.13 - * This is the "atropos" CPU scheduler. 17.14 - */ 17.15 - 17.16 -/* Ported to Xen's generic scheduler interface by Mark Williamson 17.17 - * these modifications are (C) 2004 Intel Research Cambridge 17.18 - */ 17.19 - 17.20 -#include <xen/config.h> 17.21 -#include <xen/init.h> 17.22 -#include <xen/lib.h> 17.23 -#include <xen/time.h> 17.24 -#include <xen/sched.h> 17.25 -#include <xen/sched-if.h> 17.26 -#include <public/sched_ctl.h> 17.27 -#include <xen/trace.h> 17.28 - 17.29 -#define ATROPOS_TASK_UNBLOCKED 16 17.30 -#define ATROPOS_TASK_WAIT 32 17.31 -#define ATROPOS_TASK_BLOCKED 48 17.32 - 17.33 -/* Atropos-specific per-domain data */ 17.34 -struct at_dom_info 17.35 -{ 17.36 - /* MAW Xen additions */ 17.37 - struct domain *owner; /* the domain this data belongs to */ 17.38 - struct list_head run_list; /* runqueue */ 17.39 - struct list_head waitq; /* wait queue */ 17.40 - 17.41 - /* (what remains of) the original fields */ 17.42 - 17.43 - s_time_t deadline; /* Next deadline */ 17.44 - s_time_t prevddln; /* Previous deadline */ 17.45 - 17.46 - s_time_t remain; /* Time remaining this period */ 17.47 - s_time_t period; /* Current period of time allocation */ 17.48 - s_time_t nat_period; /* Natural period */ 17.49 - s_time_t slice; /* Current length of allocation */ 17.50 - s_time_t nat_slice; /* Natural length of allocation */ 17.51 - s_time_t latency; /* Unblocking latency */ 17.52 - 17.53 - int xtratime; /* Prepared to accept extra time? */ 17.54 - int state; /* Keeps Atropos domain state */ 17.55 -}; 17.56 - 17.57 -/* Atropos-specific per-CPU data */ 17.58 -struct at_cpu_info 17.59 -{ 17.60 - struct list_head runq; 17.61 - struct list_head waitq; 17.62 -}; 17.63 - 17.64 - 17.65 -#define DOM_INFO(_p) ((struct at_dom_info *)((_p)->sched_priv)) 17.66 -#define CPU_INFO(_c) ((struct at_cpu_info *)((schedule_data[_c]).sched_priv)) 17.67 -#define WAITQ(cpu) (&CPU_INFO(cpu)->waitq) 17.68 -#define RUNQ(cpu) (&CPU_INFO(cpu)->runq) 17.69 -#define RUNLIST(_d) (&DOM_INFO(_d)->run_list) 17.70 - 17.71 -#define BESTEFFORT_QUANTUM MILLISECS(5) 17.72 - 17.73 -static void at_dump_cpu_state(int cpu); 17.74 - 17.75 -static inline void __add_to_runqueue_head(struct domain *d) 17.76 -{ 17.77 - list_add(RUNLIST(d), RUNQ(d->processor)); 17.78 -} 17.79 - 17.80 -static inline void __add_to_runqueue_tail(struct domain *d) 17.81 -{ 17.82 - list_add_tail(RUNLIST(d), RUNQ(d->processor)); 17.83 -} 17.84 - 17.85 -static inline void __del_from_runqueue(struct domain *d) 17.86 -{ 17.87 - struct list_head *runlist = RUNLIST(d); 17.88 - list_del(runlist); 17.89 - runlist->next = NULL; 17.90 -} 17.91 - 17.92 -static inline int __task_on_runqueue(struct domain *d) 17.93 -{ 17.94 - return (RUNLIST(d))->next != NULL; 17.95 -} 17.96 - 17.97 - 17.98 -/** calculate the length of a linked list */ 17.99 -static int q_len(struct list_head *q) 17.100 -{ 17.101 - int i = 0; 17.102 - struct at_dom_info *tmp; 17.103 - list_for_each_entry ( tmp, q, waitq ) 17.104 - i++; 17.105 - return i; 17.106 -} 17.107 - 17.108 - 17.109 -/** waitq_el - get the domain that owns a wait queue list element */ 17.110 -static inline struct domain *waitq_el(struct list_head *l) 17.111 -{ 17.112 - struct at_dom_info *inf; 17.113 - inf = list_entry(l, struct at_dom_info, waitq); 17.114 - return inf->owner; 17.115 -} 17.116 - 17.117 - 17.118 -/* 17.119 - * requeue 17.120 - * 17.121 - * Places the specified domain on the appropriate queue. 17.122 - * The wait queue is ordered by the time at which the domain 17.123 - * will receive more CPU time. If a domain has no guaranteed time 17.124 - * left then the domain will be placed on the WAIT queue until 17.125 - * its next period. 17.126 - * 17.127 - * Note that domains can be on the wait queue with remain > 0 17.128 - * as a result of being blocked for a short time. 17.129 - * These are scheduled in preference to domains with remain < 0 17.130 - * in an attempt to improve interactive performance. 17.131 - */ 17.132 -static void requeue(struct domain *sdom) 17.133 -{ 17.134 - struct at_dom_info *i, *inf = DOM_INFO(sdom); 17.135 - 17.136 - if ( !domain_runnable(sdom) ) 17.137 - return; 17.138 - 17.139 - if ( (inf->state == ATROPOS_TASK_WAIT) || 17.140 - (inf->state == ATROPOS_TASK_UNBLOCKED) ) 17.141 - { 17.142 - list_for_each_entry ( i, WAITQ(sdom->processor), waitq ) 17.143 - { 17.144 - if ( i->deadline > inf->deadline ) 17.145 - { 17.146 - __list_add(&inf->waitq, i->waitq.prev, &i->waitq); 17.147 - break; 17.148 - } 17.149 - } 17.150 - 17.151 - if ( &i->waitq == WAITQ(sdom->processor) ) 17.152 - list_add_tail(&inf->waitq, WAITQ(sdom->processor)); 17.153 - } 17.154 - else if ( domain_runnable(sdom) ) 17.155 - { 17.156 - list_for_each_entry ( i, RUNQ(sdom->processor), run_list ) 17.157 - { 17.158 - if ( (i->deadline > inf->deadline) || is_idle_task(i->owner) ) 17.159 - { 17.160 - __list_add(&inf->run_list, i->run_list.prev, &i->run_list); 17.161 - break; 17.162 - } 17.163 - } 17.164 - 17.165 - if ( &i->waitq == RUNQ(sdom->processor) ) 17.166 - list_add_tail(&inf->run_list, RUNQ(sdom->processor)); 17.167 - } 17.168 - /* silently ignore tasks in other states like BLOCKED, DYING, STOPPED, etc 17.169 - * - they shouldn't be on any queue */ 17.170 -} 17.171 - 17.172 -/** at_alloc_task - allocate private info for a task */ 17.173 -static int at_alloc_task(struct domain *p) 17.174 -{ 17.175 - ASSERT(p != NULL); 17.176 - 17.177 - p->sched_priv = xmalloc(struct at_dom_info); 17.178 - if ( p->sched_priv == NULL ) 17.179 - return -1; 17.180 - 17.181 - return 0; 17.182 -} 17.183 - 17.184 - 17.185 -/* prepare a task to be added to scheduling */ 17.186 -static void at_add_task(struct domain *p) 17.187 -{ 17.188 - s_time_t now = NOW(); 17.189 - 17.190 - ASSERT( p->sched_priv != NULL ); 17.191 - 17.192 - DOM_INFO(p)->owner = p; 17.193 - p->lastschd = now; 17.194 - 17.195 - /* DOM 0's parameters must be set here for it to boot the system! */ 17.196 - if(p->id == 0) 17.197 - { 17.198 - DOM_INFO(p)->remain = MILLISECS(15); 17.199 - DOM_INFO(p)->nat_period = 17.200 - DOM_INFO(p)->period = MILLISECS(20); 17.201 - DOM_INFO(p)->nat_slice = 17.202 - DOM_INFO(p)->slice = MILLISECS(15); 17.203 - DOM_INFO(p)->latency = MILLISECS(5); 17.204 - DOM_INFO(p)->xtratime = 1; 17.205 - DOM_INFO(p)->deadline = now; 17.206 - DOM_INFO(p)->prevddln = now; 17.207 - } 17.208 - else /* other domains run basically best effort unless otherwise set */ 17.209 - { 17.210 - DOM_INFO(p)->remain = 0; 17.211 - DOM_INFO(p)->nat_period = 17.212 - DOM_INFO(p)->period = SECONDS(10); 17.213 - DOM_INFO(p)->nat_slice = 17.214 - DOM_INFO(p)->slice = MILLISECS(10); 17.215 - DOM_INFO(p)->latency = SECONDS(10); 17.216 - DOM_INFO(p)->xtratime = 1; 17.217 - DOM_INFO(p)->deadline = now; 17.218 -// DOM_INFO(p)->deadline = now + SECONDS(10); 17.219 - DOM_INFO(p)->prevddln = 0; 17.220 - } 17.221 - 17.222 - INIT_LIST_HEAD(&(DOM_INFO(p)->run_list)); 17.223 - INIT_LIST_HEAD(&(DOM_INFO(p)->waitq)); 17.224 -} 17.225 - 17.226 -/** 17.227 - * dequeue - remove a domain from any queues it is on. 17.228 - * @sdom: the task to remove 17.229 - */ 17.230 -static void dequeue(struct domain *sdom) 17.231 -{ 17.232 - struct at_dom_info *inf = DOM_INFO(sdom); 17.233 - 17.234 - ASSERT(sdom->id != IDLE_DOMAIN_ID); 17.235 - 17.236 - /* just delete it from all the queues! */ 17.237 - list_del(&inf->waitq); 17.238 - INIT_LIST_HEAD(&inf->waitq); 17.239 - 17.240 - 17.241 - if(__task_on_runqueue(sdom)) 17.242 - __del_from_runqueue(sdom); 17.243 -} 17.244 - 17.245 - 17.246 -/* 17.247 - * unblock 17.248 - * 17.249 - * This function deals with updating the sdom for a domain 17.250 - * which has just been unblocked. 17.251 - * 17.252 - * Xen's Atropos treats unblocking slightly differently to Nemesis: 17.253 - * 17.254 - * - "Short blocking" domains (i.e. that unblock before their deadline has 17.255 - * expired) are treated the same as in nemesis (put on the wait queue and 17.256 - * given preferential treatment in selecting domains for extra time). 17.257 - * 17.258 - * - "Long blocking" domains do not simply have their period truncated to their 17.259 - * unblocking latency as before but also have their slice recomputed to be the 17.260 - * same fraction of their new period. Each time the domain is scheduled, the 17.261 - * period and slice are doubled until they reach their original ("natural") 17.262 - * values, as set by the user (and stored in nat_period and nat_slice). The 17.263 - * idea is to give better response times to unblocking whilst preserving QoS 17.264 - * guarantees to other domains. 17.265 - */ 17.266 -static void unblock(struct domain *sdom) 17.267 -{ 17.268 - s_time_t time = NOW(); 17.269 - struct at_dom_info *inf = DOM_INFO(sdom); 17.270 - 17.271 - dequeue(sdom); 17.272 - 17.273 - /* We distinguish two cases... short and long blocks */ 17.274 - if ( inf->deadline < time ) 17.275 - { 17.276 - /* Long blocking case */ 17.277 - 17.278 - /* The sdom has passed its deadline since it was blocked. 17.279 - Give it its new deadline based on the latency value. */ 17.280 - inf->prevddln = time; 17.281 - 17.282 - /* Scale the scheduling parameters as requested by the latency hint. */ 17.283 - inf->deadline = time + inf->latency; 17.284 - inf->slice = inf->nat_slice / ( inf->nat_period / inf->latency ); 17.285 - inf->period = inf->latency; 17.286 - inf->remain = inf->slice; 17.287 - } 17.288 - else 17.289 - { 17.290 - /* Short blocking case */ 17.291 - 17.292 - /* We leave REMAIN intact, but put this domain on the WAIT 17.293 - queue marked as recently unblocked. It will be given 17.294 - priority over other domains on the wait queue until while 17.295 - REMAIN>0 in a generous attempt to help it make up for its 17.296 - own foolishness. */ 17.297 - if(inf->remain > 0) 17.298 - inf->state = ATROPOS_TASK_UNBLOCKED; 17.299 - else 17.300 - inf->state = ATROPOS_TASK_WAIT; 17.301 - } 17.302 - 17.303 - requeue(sdom); 17.304 -} 17.305 - 17.306 - 17.307 -static int at_init_idle_task(struct domain *p) 17.308 -{ 17.309 - if(at_alloc_task(p) < 0) return -1; 17.310 - 17.311 - at_add_task(p); 17.312 - 17.313 - dequeue(p); 17.314 - requeue(p); 17.315 - 17.316 - return 0; 17.317 -} 17.318 - 17.319 - 17.320 -static void block(struct domain* sdom) 17.321 -{ 17.322 - DOM_INFO(sdom)->state = ATROPOS_TASK_BLOCKED; 17.323 - dequeue(sdom); 17.324 - requeue(sdom); 17.325 -} 17.326 - 17.327 - 17.328 -/** 17.329 - * ATROPOS - main scheduler function 17.330 - */ 17.331 -struct task_slice ksched_scheduler(s_time_t time) 17.332 -{ 17.333 - struct domain *cur_sdom = current; /* Current sdom */ 17.334 - s_time_t newtime; 17.335 - s_time_t ranfor; /* How long the domain ran */ 17.336 - struct domain *sdom; /* tmp. scheduling domain */ 17.337 - int cpu = cur_sdom->processor; /* current CPU */ 17.338 - struct at_dom_info *cur_info; 17.339 - static unsigned long waitq_rrobin = 0; 17.340 - int i; 17.341 - struct task_slice ret; 17.342 - 17.343 - 17.344 - cur_info = DOM_INFO(cur_sdom); 17.345 - 17.346 - ASSERT( cur_sdom != NULL); 17.347 - 17.348 - /* If we were spinning in the idle loop, there is no current 17.349 - * domain to deschedule. */ 17.350 - if (is_idle_task(cur_sdom)) 17.351 - goto deschedule_done; 17.352 - 17.353 - /***************************** 17.354 - * 17.355 - * Deschedule the current scheduling domain 17.356 - * 17.357 - ****************************/ 17.358 - 17.359 - /* Record the time the domain was preempted and for how long it 17.360 - ran. Work out if the domain is going to be blocked to save 17.361 - some pointless queue shuffling */ 17.362 - cur_sdom->lastdeschd = time; 17.363 - 17.364 - ranfor = (time - cur_sdom->lastschd); 17.365 - 17.366 - dequeue(cur_sdom); 17.367 - 17.368 - if ( domain_runnable(cur_sdom) || 17.369 - (cur_info->state == ATROPOS_TASK_UNBLOCKED) ) 17.370 - { 17.371 - 17.372 - /* In this block, we are doing accounting for an sdom which has 17.373 - been running in contracted time. Note that this could now happen 17.374 - even if the domain is on the wait queue (i.e. if it blocked) */ 17.375 - 17.376 - /* Deduct guaranteed time from the domain */ 17.377 - cur_info->remain -= ranfor; 17.378 - 17.379 - /* If guaranteed time has run out... */ 17.380 - if ( cur_info->remain <= 0 ) 17.381 - { 17.382 - /* Move domain to correct position in WAIT queue */ 17.383 - /* XXX sdom_unblocked doesn't need this since it is 17.384 - already in the correct place. */ 17.385 - cur_info->state = ATROPOS_TASK_WAIT; 17.386 - } 17.387 - } 17.388 - 17.389 - requeue(cur_sdom); 17.390 - 17.391 - deschedule_done: 17.392 - /***************************** 17.393 - * 17.394 - * We have now successfully descheduled the current sdom. 17.395 - * The next task is the allocate CPU time to any sdom it is due to. 17.396 - * 17.397 - ****************************/ 17.398 - cur_sdom = NULL; 17.399 - 17.400 - /***************************** 17.401 - * 17.402 - * Allocate CPU time to any waiting domains who have passed their 17.403 - * period deadline. If necessary, move them to run queue. 17.404 - * 17.405 - ****************************/ 17.406 - 17.407 - while(!list_empty(WAITQ(cpu)) && 17.408 - DOM_INFO(sdom = waitq_el(WAITQ(cpu)->next))->deadline <= time ) 17.409 - { 17.410 - 17.411 - struct at_dom_info *inf = DOM_INFO(sdom); 17.412 - dequeue(sdom); 17.413 - 17.414 - if ( inf->period != inf->nat_period ) 17.415 - { 17.416 - /* This domain has had its parameters adjusted as a result of 17.417 - * unblocking and they need to be adjusted before requeuing it */ 17.418 - inf->slice *= 2; 17.419 - inf->period *= 2; 17.420 - 17.421 - if ( inf->period > inf->nat_period ) 17.422 - { 17.423 - inf->period = inf->nat_period; 17.424 - inf->slice = inf->nat_slice; 17.425 - } 17.426 - } 17.427 - 17.428 - /* Domain begins a new period and receives a slice of CPU 17.429 - * If this domain has been blocking then throw away the 17.430 - * rest of it's remain - it can't be trusted */ 17.431 - if (inf->remain > 0) 17.432 - inf->remain = inf->slice; 17.433 - else 17.434 - inf->remain += inf->slice; 17.435 - 17.436 - inf->prevddln = inf->deadline; 17.437 - inf->deadline += inf->period; 17.438 - 17.439 - if ( inf->remain <= 0 ) 17.440 - inf->state = ATROPOS_TASK_WAIT; 17.441 - 17.442 - /* Place on the appropriate queue */ 17.443 - requeue(sdom); 17.444 - } 17.445 - 17.446 - /***************************** 17.447 - * 17.448 - * Next we need to pick an sdom to run. 17.449 - * If anything is actually 'runnable', we run that. 17.450 - * If nothing is, we pick a waiting sdom to run optimistically. 17.451 - * If there aren't even any of those, we have to spin waiting for an 17.452 - * event or a suitable time condition to happen. 17.453 - * 17.454 - ****************************/ 17.455 - 17.456 - /* we guarantee there's always something on the runqueue */ 17.457 - cur_info = list_entry(RUNQ(cpu)->next, 17.458 - struct at_dom_info, run_list); 17.459 - 17.460 - cur_sdom = cur_info->owner; 17.461 - newtime = time + cur_info->remain; 17.462 - 17.463 - /* MAW - the idle domain is always on the run queue. We run from the 17.464 - * runqueue if it's NOT the idle domain or if there's nothing on the wait 17.465 - * queue */ 17.466 - if (cur_sdom->id == IDLE_DOMAIN_ID && !list_empty(WAITQ(cpu))) 17.467 - { 17.468 - struct at_dom_info *inf; 17.469 - 17.470 - /* Try running a domain on the WAIT queue - this part of the 17.471 - scheduler isn't particularly efficient but then again, we 17.472 - don't have any guaranteed domains to worry about. */ 17.473 - 17.474 - /* See if there are any unblocked domains on the WAIT 17.475 - queue who we can give preferential treatment to. */ 17.476 - 17.477 - list_for_each_entry ( inf, WAITQ(cpu), waitq ) 17.478 - { 17.479 - sdom = inf->owner; 17.480 - 17.481 - if (inf->state == ATROPOS_TASK_UNBLOCKED) 17.482 - { 17.483 - cur_sdom = sdom; 17.484 - cur_info = inf; 17.485 - newtime = time + inf->remain; 17.486 - goto found; 17.487 - } 17.488 - } 17.489 - 17.490 - /* init values needed to approximate round-robin for slack time */ 17.491 - i = 0; 17.492 - if ( waitq_rrobin >= q_len(WAITQ(cpu))) 17.493 - waitq_rrobin = 0; 17.494 - 17.495 - 17.496 - /* Last chance: pick a domain on the wait queue with the XTRA 17.497 - flag set. The NEXT_OPTM field is used to cheaply achieve 17.498 - an approximation of round-robin order */ 17.499 - list_for_each_entry ( inf, WAITQ(cpu), waitq ) 17.500 - { 17.501 - sdom = inf->owner; 17.502 - 17.503 - if (inf->xtratime && i >= waitq_rrobin) 17.504 - { 17.505 - cur_sdom = sdom; 17.506 - cur_info = inf; 17.507 - newtime = time + BESTEFFORT_QUANTUM; 17.508 - waitq_rrobin = i + 1; /* set this value ready for next */ 17.509 - goto found; 17.510 - } 17.511 - 17.512 - i++; 17.513 - } 17.514 - } 17.515 - 17.516 - found: 17.517 - /********************** 17.518 - * 17.519 - * We now have to work out the time when we next need to 17.520 - * make a scheduling decision. We set the alarm timer 17.521 - * to cause an interrupt at that time. 17.522 - * 17.523 - **********************/ 17.524 - 17.525 -#define MIN(x,y) ( ( x < y ) ? x : y ) 17.526 -#define MAX(x,y) ( ( x > y ) ? x : y ) 17.527 - 17.528 - /* If we might be able to run a waiting domain before this one has */ 17.529 - /* exhausted its time, cut short the time allocation */ 17.530 - if (!list_empty(WAITQ(cpu))) 17.531 - { 17.532 - newtime = MIN(newtime, 17.533 - DOM_INFO(waitq_el(WAITQ(cpu)->next))->deadline); 17.534 - } 17.535 - 17.536 - /* don't allow pointlessly small time slices */ 17.537 - newtime = MAX(newtime, time + BESTEFFORT_QUANTUM); 17.538 - 17.539 - ret.task = cur_sdom; 17.540 - ret.time = newtime - time; 17.541 - 17.542 - TRACE_1D(0, cur_sdom->id); 17.543 - 17.544 - return ret; 17.545 -} 17.546 - 17.547 - 17.548 -/* set up some private data structures */ 17.549 -static int at_init_scheduler() 17.550 -{ 17.551 - int i; 17.552 - 17.553 - for ( i = 0; i < NR_CPUS; i++ ) 17.554 - { 17.555 - schedule_data[i].sched_priv = xmalloc(sizeof(struct at_cpu_info)); 17.556 - if ( schedule_data[i].sched_priv == NULL ) 17.557 - return -1; 17.558 - INIT_LIST_HEAD(WAITQ(i)); 17.559 - INIT_LIST_HEAD(RUNQ(i)); 17.560 - } 17.561 - 17.562 - return 0; 17.563 -} 17.564 - 17.565 - 17.566 -/* print relevant per-domain info for a run queue dump */ 17.567 -static void at_dump_runq_el(struct domain *p) 17.568 -{ 17.569 - printk("lastschd = %llu, xtratime = %d ", 17.570 - p->lastschd, DOM_INFO(p)->xtratime); 17.571 -} 17.572 - 17.573 - 17.574 -/* dump relevant per-cpu state for a run queue dump */ 17.575 -static void at_dump_cpu_state(int cpu) 17.576 -{ 17.577 - struct list_head *queue; 17.578 - int loop = 0; 17.579 - struct at_dom_info *d_inf; 17.580 - struct domain *d; 17.581 - 17.582 - queue = RUNQ(cpu); 17.583 - printk("\nRUNQUEUE rq %lx n: %lx, p: %lx\n", (unsigned long)queue, 17.584 - (unsigned long) queue->next, (unsigned long) queue->prev); 17.585 - 17.586 - list_for_each_entry ( d_inf, queue, run_list ) 17.587 - { 17.588 - d = d_inf->owner; 17.589 - printk("%3d: %d has=%c ", loop++, d->id, 17.590 - test_bit(DF_RUNNING, &d->flags) ? 'T':'F'); 17.591 - at_dump_runq_el(d); 17.592 - printk("c=0x%X%08X\n", (u32)(d->cpu_time>>32), (u32)d->cpu_time); 17.593 - printk(" l: %lx n: %lx p: %lx\n", 17.594 - (unsigned long)&d_inf->run_list, 17.595 - (unsigned long)d_inf->run_list.next, 17.596 - (unsigned long)d_inf->run_list.prev); 17.597 - } 17.598 - 17.599 - 17.600 - queue = WAITQ(cpu); 17.601 - printk("\nWAITQUEUE rq %lx n: %lx, p: %lx\n", (unsigned long)queue, 17.602 - (unsigned long) queue->next, (unsigned long) queue->prev); 17.603 - 17.604 - list_for_each_entry ( d_inf, queue, waitq ) 17.605 - { 17.606 - d = d_inf->owner; 17.607 - printk("%3d: %d has=%c ", loop++, d->id, 17.608 - test_bit(DF_RUNNING, &d->flags) ? 'T':'F'); 17.609 - at_dump_runq_el(d); 17.610 - printk("c=0x%X%08X\n", (u32)(d->cpu_time>>32), (u32)d->cpu_time); 17.611 - printk(" l: %lx n: %lx p: %lx\n", 17.612 - (unsigned long)&d_inf->waitq, 17.613 - (unsigned long)d_inf->waitq.next, 17.614 - (unsigned long)d_inf->waitq.prev); 17.615 - } 17.616 - 17.617 -} 17.618 - 17.619 -/* set or fetch domain scheduling parameters */ 17.620 -static int at_adjdom(struct domain *p, struct sched_adjdom_cmd *cmd) 17.621 -{ 17.622 - if ( cmd->direction == SCHED_INFO_PUT ) 17.623 - { 17.624 - /* sanity checking! */ 17.625 - if( cmd->u.atropos.latency > cmd->u.atropos.nat_period 17.626 - || cmd->u.atropos.latency == 0 17.627 - || cmd->u.atropos.nat_slice > cmd->u.atropos.nat_period ) 17.628 - return -EINVAL; 17.629 - 17.630 - DOM_INFO(p)->nat_period = cmd->u.atropos.nat_period; 17.631 - DOM_INFO(p)->nat_slice = cmd->u.atropos.nat_slice; 17.632 - DOM_INFO(p)->latency = cmd->u.atropos.latency; 17.633 - DOM_INFO(p)->xtratime = !!cmd->u.atropos.xtratime; 17.634 - } 17.635 - else if ( cmd->direction == SCHED_INFO_GET ) 17.636 - { 17.637 - cmd->u.atropos.nat_period = DOM_INFO(p)->nat_period; 17.638 - cmd->u.atropos.nat_slice = DOM_INFO(p)->nat_slice; 17.639 - cmd->u.atropos.latency = DOM_INFO(p)->latency; 17.640 - cmd->u.atropos.xtratime = DOM_INFO(p)->xtratime; 17.641 - } 17.642 - 17.643 - return 0; 17.644 -} 17.645 - 17.646 -/* free memory associated with a task */ 17.647 -static void at_free_task(struct domain *p) 17.648 -{ 17.649 - xfree( DOM_INFO(p) ); 17.650 -} 17.651 - 17.652 - 17.653 -/* print decoded domain private state value (if known) */ 17.654 -static int at_prn_state(int state) 17.655 -{ 17.656 - int ret = 0; 17.657 - 17.658 - switch(state) 17.659 - { 17.660 - case ATROPOS_TASK_UNBLOCKED: 17.661 - printk("Unblocked"); 17.662 - break; 17.663 - case ATROPOS_TASK_WAIT: 17.664 - printk("Wait"); 17.665 - break; 17.666 - default: 17.667 - ret = -1; 17.668 - } 17.669 - 17.670 - return ret; 17.671 -} 17.672 - 17.673 -struct scheduler sched_atropos_def = { 17.674 - .name = "Atropos Soft Real Time Scheduler", 17.675 - .opt_name = "atropos", 17.676 - .sched_id = SCHED_ATROPOS, 17.677 - .init_scheduler = at_init_scheduler, 17.678 - .init_idle_task = at_init_idle_task, 17.679 - .alloc_task = at_alloc_task, 17.680 - .add_task = at_add_task, 17.681 - .free_task = at_free_task, 17.682 - .wake = unblock, 17.683 - .sleep = block, 17.684 - .do_schedule = ksched_scheduler, 17.685 - .adjdom = at_adjdom, 17.686 - .dump_cpu_state = at_dump_cpu_state, 17.687 - .prn_state = at_prn_state, 17.688 -}; 17.689 - 17.690 -/* 17.691 - * Local variables: 17.692 - * mode: C 17.693 - * c-set-style: "BSD" 17.694 - * c-basic-offset: 4 17.695 - * tab-width: 4 17.696 - * indent-tabs-mode: nil 17.697 - * End: 17.698 - */
18.1 --- a/xen/common/sched_rrobin.c Mon Apr 04 16:09:46 2005 +0000 18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 18.3 @@ -1,227 +0,0 @@ 18.4 -/**************************************************************************** 18.5 - * Round Robin Scheduler for Xen 18.6 - * 18.7 - * by Mark Williamson (C) 2004 Intel Research Cambridge 18.8 - */ 18.9 - 18.10 -#include <xen/sched.h> 18.11 -#include <xen/sched-if.h> 18.12 -#include <public/sched_ctl.h> 18.13 -#include <xen/ac_timer.h> 18.14 -#include <xen/softirq.h> 18.15 -#include <xen/time.h> 18.16 -#include <xen/slab.h> 18.17 - 18.18 -#define TIME_SLOP (s32)MICROSECS(50) /* allow time to slip a bit */ 18.19 - 18.20 -static s_time_t rr_slice = MILLISECS(10); 18.21 - 18.22 -/* Only runqueue pointers and domain pointer*/ 18.23 -struct rrobin_dom_info 18.24 -{ 18.25 - struct list_head run_list; 18.26 - struct domain *domain; 18.27 -}; 18.28 - 18.29 -#define RR_INFO(d) ((struct rrobin_dom_info *)d->sched_priv) 18.30 -#define RUNLIST(d) ((struct list_head *)&(RR_INFO(d)->run_list)) 18.31 -#define RUNQUEUE(cpu) RUNLIST(schedule_data[cpu].idle) 18.32 - 18.33 -static inline void __add_to_runqueue_head(struct domain *d) 18.34 -{ 18.35 - list_add(RUNLIST(d), RUNQUEUE(d->processor)); 18.36 -} 18.37 - 18.38 -static inline void __add_to_runqueue_tail(struct domain *d) 18.39 -{ 18.40 - list_add_tail(RUNLIST(d), RUNQUEUE(d->processor)); 18.41 -} 18.42 - 18.43 -static inline void __del_from_runqueue(struct domain *d) 18.44 -{ 18.45 - struct list_head *runlist = RUNLIST(d); 18.46 - list_del(runlist); 18.47 - runlist->next = NULL; 18.48 -} 18.49 - 18.50 -static inline int __task_on_runqueue(struct domain *d) 18.51 -{ 18.52 - return (RUNLIST(d))->next != NULL; 18.53 -} 18.54 - 18.55 -/* Initialises the runqueues and creates the domain info cache */ 18.56 -static int rr_init_scheduler() 18.57 -{ 18.58 - int i; 18.59 - 18.60 - for ( i = 0; i < NR_CPUS; i++ ) 18.61 - INIT_LIST_HEAD(RUNQUEUE(i)); 18.62 - 18.63 - return 0; 18.64 -} 18.65 -/* Allocates memory for per domain private scheduling data*/ 18.66 -static int rr_alloc_task(struct domain *d) 18.67 -{ 18.68 - if ( (d->sched_priv = new(struct rrobin_dom_info) == NULL ) 18.69 - return -1; 18.70 - memset(d->sched_priv, 0, sizeof(struct rrobin_dom_info)); 18.71 - return 0; 18.72 -} 18.73 - 18.74 -/* Setup the rr_dom_info */ 18.75 -static void rr_add_task(struct domain *d) 18.76 -{ 18.77 - struct rrobin_dom_info *inf; 18.78 - RR_INFO(d)->domain = d; 18.79 - inf = RR_INFO(d); 18.80 -} 18.81 - 18.82 -/* Frees memory used by domain info */ 18.83 -static void rr_free_task(struct domain *d) 18.84 -{ 18.85 - ASSERT(d->sched_priv != NULL); 18.86 - xfree(d->sched_priv); 18.87 -} 18.88 - 18.89 -/* Initialises idle task */ 18.90 -static int rr_init_idle_task(struct domain *d) 18.91 -{ 18.92 - if ( rr_alloc_task(d) < 0 ) 18.93 - return -1; 18.94 - 18.95 - rr_add_task(d); 18.96 - 18.97 - set_bit(DF_RUNNING, &d->flags); 18.98 - if ( !__task_on_runqueue(d) ) 18.99 - __add_to_runqueue_head(d); 18.100 - 18.101 - return 0; 18.102 -} 18.103 - 18.104 -/* Main scheduling function */ 18.105 -static struct task_slice rr_do_schedule(s_time_t now) 18.106 -{ 18.107 - struct domain *prev = current; 18.108 - int cpu = current->processor; 18.109 - struct task_slice ret; 18.110 - 18.111 - if ( !is_idle_task(prev) ) 18.112 - { 18.113 - __del_from_runqueue(prev); 18.114 - 18.115 - if ( domain_runnable(prev) ) 18.116 - __add_to_runqueue_tail(prev); 18.117 - } 18.118 - 18.119 - ret.task = list_entry(RUNQUEUE(cpu)->next, 18.120 - struct rrobin_dom_info, 18.121 - run_list)->domain; 18.122 - ret.time = rr_slice; 18.123 - return ret; 18.124 -} 18.125 - 18.126 -/* Set/retrive control parameter(s) */ 18.127 -static int rr_ctl(struct sched_ctl_cmd *cmd) 18.128 -{ 18.129 - if ( cmd->direction == SCHED_INFO_PUT ) 18.130 - { 18.131 - rr_slice = cmd->u.rrobin.slice; 18.132 - } 18.133 - else /* cmd->direction == SCHED_INFO_GET */ 18.134 - { 18.135 - cmd->u.rrobin.slice = rr_slice; 18.136 - } 18.137 - 18.138 - return 0; 18.139 -} 18.140 - 18.141 -static void rr_dump_settings() 18.142 -{ 18.143 - printk("rr_slice = %llu ", rr_slice); 18.144 -} 18.145 - 18.146 -static void rr_sleep(struct domain *d) 18.147 -{ 18.148 - if ( test_bit(DF_RUNNING, &d->flags) ) 18.149 - cpu_raise_softirq(d->processor, SCHEDULE_SOFTIRQ); 18.150 - else if ( __task_on_runqueue(d) ) 18.151 - __del_from_runqueue(d); 18.152 -} 18.153 - 18.154 -void rr_wake(struct domain *d) 18.155 -{ 18.156 - struct domain *curr; 18.157 - s_time_t now; 18.158 - int cpu = d->processor; 18.159 - 18.160 - if ( unlikely(__task_on_runqueue(d)) ) 18.161 - return; 18.162 - 18.163 - __add_to_runqueue_head(d); 18.164 - 18.165 - now = NOW(); 18.166 - 18.167 - curr = schedule_data[cpu].curr; 18.168 - if ( is_idle_task(curr) ) 18.169 - cpu_raise_softirq(cpu, SCHEDULE_SOFTIRQ); 18.170 -} 18.171 - 18.172 - 18.173 -static void rr_dump_domain(struct domain *d) 18.174 -{ 18.175 - printk("%u has=%c ", d->id, 18.176 - test_bit(DF_RUNNING, &d->flags) ? 'T':'F'); 18.177 - printk("c=0x%X%08X\n", (u32)(d->cpu_time>>32), (u32)d->cpu_time); 18.178 -} 18.179 - 18.180 -static void rr_dump_cpu_state(int i) 18.181 -{ 18.182 - struct list_head *queue; 18.183 - int loop = 0; 18.184 - struct rrobin_dom_info *d_inf; 18.185 - 18.186 - queue = RUNQUEUE(i); 18.187 - printk("QUEUE rq %lx n: %lx, p: %lx\n", (unsigned long)queue, 18.188 - (unsigned long) queue->next, (unsigned long) queue->prev); 18.189 - 18.190 - printk("%3d: ",loop++); 18.191 - d_inf = list_entry(queue, struct rrobin_dom_info, run_list); 18.192 - rr_dump_domain(d_inf->domain); 18.193 - 18.194 - list_for_each_entry ( d_inf, queue, run_list ) 18.195 - { 18.196 - printk("%3d: ",loop++); 18.197 - rr_dump_domain(d_inf->domain); 18.198 - } 18.199 -} 18.200 - 18.201 - 18.202 -struct scheduler sched_rrobin_def = { 18.203 - .name = "Round-Robin Scheduler", 18.204 - .opt_name = "rrobin", 18.205 - .sched_id = SCHED_RROBIN, 18.206 - 18.207 - .init_idle_task = rr_init_idle_task, 18.208 - .alloc_task = rr_alloc_task, 18.209 - .add_task = rr_add_task, 18.210 - .free_task = rr_free_task, 18.211 - .init_scheduler = rr_init_scheduler, 18.212 - .do_schedule = rr_do_schedule, 18.213 - .control = rr_ctl, 18.214 - .dump_settings = rr_dump_settings, 18.215 - .dump_cpu_state = rr_dump_cpu_state, 18.216 - .sleep = rr_sleep, 18.217 - .wake = rr_wake, 18.218 -}; 18.219 - 18.220 - 18.221 - 18.222 -/* 18.223 - * Local variables: 18.224 - * mode: C 18.225 - * c-set-style: "BSD" 18.226 - * c-basic-offset: 4 18.227 - * tab-width: 4 18.228 - * indent-tabs-mode: nil 18.229 - * End: 18.230 - */
19.1 --- a/xen/common/schedule.c Mon Apr 04 16:09:46 2005 +0000 19.2 +++ b/xen/common/schedule.c Mon Apr 04 16:55:15 2005 +0000 19.3 @@ -242,11 +242,19 @@ void domain_wake(struct exec_domain *ed) 19.4 /* Block the currently-executing domain until a pertinent event occurs. */ 19.5 long do_block(void) 19.6 { 19.7 - ASSERT(current->domain->id != IDLE_DOMAIN_ID); 19.8 - current->vcpu_info->evtchn_upcall_mask = 0; 19.9 - set_bit(EDF_BLOCKED, ¤t->ed_flags); 19.10 - TRACE_2D(TRC_SCHED_BLOCK, current->domain->id, current); 19.11 - __enter_scheduler(); 19.12 + struct exec_domain *ed = current; 19.13 + 19.14 + TRACE_2D(TRC_SCHED_BLOCK, ed->domain->id, ed); 19.15 + 19.16 + ed->vcpu_info->evtchn_upcall_mask = 0; 19.17 + set_bit(EDF_BLOCKED, &ed->ed_flags); 19.18 + 19.19 + /* Check for events /after/ blocking: avoids wakeup waiting race. */ 19.20 + if ( event_pending(ed) ) 19.21 + clear_bit(EDF_BLOCKED, &ed->ed_flags); 19.22 + else 19.23 + __enter_scheduler(); 19.24 + 19.25 return 0; 19.26 } 19.27 19.28 @@ -371,15 +379,6 @@ static void __enter_scheduler(void) 19.29 19.30 ASSERT(!in_irq()); 19.31 19.32 - if ( test_bit(EDF_BLOCKED, &prev->ed_flags) ) 19.33 - { 19.34 - /* This check is needed to avoid a race condition. */ 19.35 - if ( event_pending(prev) ) 19.36 - clear_bit(EDF_BLOCKED, &prev->ed_flags); 19.37 - else 19.38 - SCHED_OP(do_block, prev); 19.39 - } 19.40 - 19.41 prev->cpu_time += now - prev->lastschd; 19.42 19.43 /* get policy-specific decision on scheduling... */
20.1 --- a/xen/include/public/dom0_ops.h Mon Apr 04 16:09:46 2005 +0000 20.2 +++ b/xen/include/public/dom0_ops.h Mon Apr 04 16:55:15 2005 +0000 20.3 @@ -19,7 +19,7 @@ 20.4 * This makes sure that old versions of dom0 tools will stop working in a 20.5 * well-defined way (rather than crashing the machine, for instance). 20.6 */ 20.7 -#define DOM0_INTERFACE_VERSION 0xAAAA1003 20.8 +#define DOM0_INTERFACE_VERSION 0xAAAA1004 20.9 20.10 /************************************************************************/ 20.11
21.1 --- a/xen/include/public/sched_ctl.h Mon Apr 04 16:09:46 2005 +0000 21.2 +++ b/xen/include/public/sched_ctl.h Mon Apr 04 16:55:15 2005 +0000 21.3 @@ -1,4 +1,4 @@ 21.4 -/** 21.5 +/****************************************************************************** 21.6 * Generic scheduler control interface. 21.7 * 21.8 * Mark Williamson, (C) 2004 Intel Research Cambridge 21.9 @@ -7,13 +7,10 @@ 21.10 #ifndef __XEN_PUBLIC_SCHED_CTL_H__ 21.11 #define __XEN_PUBLIC_SCHED_CTL_H__ 21.12 21.13 -/* Scheduler types */ 21.14 +/* Scheduler types. */ 21.15 #define SCHED_BVT 0 21.16 -#define SCHED_ATROPOS 2 21.17 -#define SCHED_RROBIN 3 21.18 21.19 -/* these describe the intended direction used for a scheduler control or domain 21.20 - * command */ 21.21 +/* Set or get info? */ 21.22 #define SCHED_INFO_PUT 0 21.23 #define SCHED_INFO_GET 1 21.24 21.25 @@ -23,48 +20,29 @@ 21.26 */ 21.27 struct sched_ctl_cmd 21.28 { 21.29 - u32 sched_id; /* 0 */ 21.30 - u32 direction; /* 4 */ 21.31 - union { /* 8 */ 21.32 - struct bvt_ctl 21.33 - { 21.34 - /* IN variables. */ 21.35 - u32 ctx_allow; /* 8: context switch allowance */ 21.36 - } PACKED bvt; 21.37 - 21.38 - struct rrobin_ctl 21.39 - { 21.40 - /* IN variables */ 21.41 - u64 slice; /* 8: round robin time slice */ 21.42 - } PACKED rrobin; 21.43 - } PACKED u; 21.44 -} PACKED; /* 16 bytes */ 21.45 + u32 sched_id; 21.46 + u32 direction; 21.47 + union { 21.48 + struct bvt_ctl { 21.49 + u32 ctx_allow; 21.50 + } bvt; 21.51 + } u; 21.52 +}; 21.53 21.54 struct sched_adjdom_cmd 21.55 { 21.56 - u32 sched_id; /* 0 */ 21.57 - u32 direction; /* 4 */ 21.58 - domid_t domain; /* 8 */ 21.59 - u16 __pad0; 21.60 - u32 __pad1; 21.61 - union { /* 16 */ 21.62 - struct bvt_adjdom 21.63 - { 21.64 - u32 mcu_adv; /* 16: mcu advance: inverse of weight */ 21.65 - u32 warpback; /* 20: warp? */ 21.66 - s32 warpvalue; /* 24: warp value */ 21.67 - long long warpl; /* 32: warp limit */ 21.68 - long long warpu; /* 40: unwarp time requirement */ 21.69 - } PACKED bvt; 21.70 - 21.71 - struct atropos_adjdom 21.72 - { 21.73 - u64 nat_period; /* 16 */ 21.74 - u64 nat_slice; /* 24 */ 21.75 - u64 latency; /* 32 */ 21.76 - u32 xtratime; /* 36 */ 21.77 - } PACKED atropos; 21.78 - } PACKED u; 21.79 -} PACKED; /* 40 bytes */ 21.80 + u32 sched_id; 21.81 + u32 direction; 21.82 + domid_t domain; 21.83 + union { 21.84 + struct bvt_adjdom { 21.85 + u32 mcu_adv; /* mcu advance: inverse of weight */ 21.86 + u32 warpback; /* warp? */ 21.87 + s32 warpvalue; /* warp value */ 21.88 + long long warpl; /* warp limit */ 21.89 + long long warpu; /* unwarp time requirement */ 21.90 + } bvt; 21.91 + } u; 21.92 +}; 21.93 21.94 #endif /* __XEN_PUBLIC_SCHED_CTL_H__ */
22.1 --- a/xen/include/xen/sched-if.h Mon Apr 04 16:09:46 2005 +0000 22.2 +++ b/xen/include/xen/sched-if.h Mon Apr 04 16:55:15 2005 +0000 22.3 @@ -30,7 +30,7 @@ struct scheduler { 22.4 char *opt_name; /* option name for this scheduler */ 22.5 unsigned int sched_id; /* ID for this scheduler */ 22.6 22.7 - int (*init_scheduler) (); 22.8 + int (*init_scheduler) (void); 22.9 int (*init_idle_task) (struct exec_domain *); 22.10 int (*alloc_task) (struct exec_domain *); 22.11 void (*add_task) (struct exec_domain *); 22.12 @@ -38,14 +38,12 @@ struct scheduler { 22.13 void (*rem_task) (struct exec_domain *); 22.14 void (*sleep) (struct exec_domain *); 22.15 void (*wake) (struct exec_domain *); 22.16 - void (*do_block) (struct exec_domain *); 22.17 struct task_slice (*do_schedule) (s_time_t); 22.18 int (*control) (struct sched_ctl_cmd *); 22.19 int (*adjdom) (struct domain *, 22.20 struct sched_adjdom_cmd *); 22.21 void (*dump_settings) (void); 22.22 void (*dump_cpu_state) (int); 22.23 - int (*prn_state) (int); 22.24 }; 22.25 22.26 extern struct schedule_data schedule_data[];