mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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>
This commit is contained in:
1 parent
275ad12c9b
commit
976f6fc92c
22 files changed
+48
-1339
No files matched your search
@@ -800,76 +800,6 @@ static PyObject *pyxc_physinfo(PyObject *self,
|
||||
"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)
|
||||
{
|
||||
XcObject *xc = (XcObject *)self;
|
||||
u64 slice;
|
||||
|
||||
static char *kwd_list[] = { "slice", NULL };
|
||||
|
||||
if( !PyArg_ParseTupleAndKeywords(args, kwds, "L", kwd_list, &slice) )
|
||||
return NULL;
|
||||
|
||||
if ( xc_rrobin_global_set(xc->xc_handle, slice) != 0 )
|
||||
return PyErr_SetFromErrno(xc_error);
|
||||
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_shadow_control(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
@@ -892,22 +822,6 @@ static PyObject *pyxc_shadow_control(PyObject *self,
|
||||
return zero;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_rrobin_global_get(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
XcObject *xc = (XcObject *)self;
|
||||
u64 slice;
|
||||
|
||||
if ( !PyArg_ParseTuple(args, "") )
|
||||
return NULL;
|
||||
|
||||
if ( xc_rrobin_global_get(xc->xc_handle, &slice) != 0 )
|
||||
return PyErr_SetFromErrno(xc_error);
|
||||
|
||||
return Py_BuildValue("{s:L}", "slice", slice);
|
||||
}
|
||||
|
||||
static PyObject *pyxc_domain_setmaxmem(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
@@ -1079,44 +993,6 @@ static PyMethodDef pyxc_methods[] = {
|
||||
" warpl [long]: Warp limit,\n"
|
||||
},
|
||||
|
||||
{ "atropos_domain_set",
|
||||
(PyCFunction)pyxc_atropos_domain_set,
|
||||
METH_KEYWORDS, "\n"
|
||||
"Set the scheduling parameters for a domain when running with Atropos.\n"
|
||||
" dom [int]: domain to set\n"
|
||||
" period [long]: domain's scheduling period\n"
|
||||
" slice [long]: domain's slice per period\n"
|
||||
" latency [long]: wakeup latency hint\n"
|
||||
" xtratime [int]: boolean\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "atropos_domain_get",
|
||||
(PyCFunction)pyxc_atropos_domain_get,
|
||||
METH_KEYWORDS, "\n"
|
||||
"Get the current scheduling parameters for a domain when running with\n"
|
||||
"the Atropos scheduler."
|
||||
" dom [int]: domain to query\n"
|
||||
"Returns: [dict]\n"
|
||||
" domain [int]: domain ID\n"
|
||||
" period [long]: scheduler period\n"
|
||||
" slice [long]: CPU reservation per period\n"
|
||||
" latency [long]: unblocking latency hint\n"
|
||||
" xtratime [int] : 0 if not using slack time, nonzero otherwise\n" },
|
||||
|
||||
{ "rrobin_global_set",
|
||||
(PyCFunction)pyxc_rrobin_global_set,
|
||||
METH_KEYWORDS, "\n"
|
||||
"Set Round Robin scheduler slice.\n"
|
||||
" slice [long]: Round Robin scheduler slice\n"
|
||||
"Returns: [int] 0 on success, throws an exception on failure\n" },
|
||||
|
||||
{ "rrobin_global_get",
|
||||
(PyCFunction)pyxc_rrobin_global_get,
|
||||
METH_KEYWORDS, "\n"
|
||||
"Get Round Robin scheduler settings\n"
|
||||
"Returns [dict]:\n"
|
||||
" slice [long]: Scheduler time slice.\n" },
|
||||
|
||||
{ "evtchn_alloc_unbound",
|
||||
(PyCFunction)pyxc_evtchn_alloc_unbound,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
|
||||
@@ -189,11 +189,6 @@ class Xend:
|
||||
def xend_node_log(self):
|
||||
return self.xendGet(self.nodeurl('log'))
|
||||
|
||||
def xend_node_cpu_rrobin_slice_set(self, slice):
|
||||
return self.xendPost(self.nodeurl(),
|
||||
{'op' : 'cpu_rrobin_slice_set',
|
||||
'slice' : slice })
|
||||
|
||||
def xend_node_cpu_bvt_slice_set(self, ctx_allow):
|
||||
return self.xendPost(self.nodeurl(),
|
||||
{'op' : 'cpu_bvt_slice_set',
|
||||
@@ -265,14 +260,6 @@ class Xend:
|
||||
'warpl' : warpl,
|
||||
'warpu' : warpu })
|
||||
|
||||
def xend_domain_cpu_atropos_set(self, id, period, slice, latency, xtratime):
|
||||
return self.xendPost(self.domainurl(id),
|
||||
{'op' : 'cpu_atropos_set',
|
||||
'period' : period,
|
||||
'slice' : slice,
|
||||
'latency' : latency,
|
||||
'xtratime': xtratime })
|
||||
|
||||
def xend_domain_maxmem_set(self, id, memory):
|
||||
return self.xendPost(self.domainurl(id),
|
||||
{ 'op' : 'maxmem_set',
|
||||
|
||||
@@ -642,24 +642,6 @@ class XendDomain:
|
||||
except Exception, ex:
|
||||
raise XendError(str(ex))
|
||||
|
||||
def domain_cpu_atropos_set(self, id, period, slice, latency, xtratime):
|
||||
"""Set Atropos scheduler parameters for a domain.
|
||||
"""
|
||||
dominfo = self.domain_lookup(id)
|
||||
try:
|
||||
return xc.atropos_domain_set(dominfo.dom, period, slice, latency, xtratime)
|
||||
except Exception, ex:
|
||||
raise XendError(str(ex))
|
||||
|
||||
def domain_cpu_atropos_get(self, id):
|
||||
"""Get Atropos scheduler parameters for a domain.
|
||||
"""
|
||||
dominfo = self.domain_lookup(id)
|
||||
try:
|
||||
return xc.atropos_domain_get(dominfo.dom)
|
||||
except Exception, ex:
|
||||
raise XendError(str(ex))
|
||||
|
||||
def domain_device_create(self, id, devconfig):
|
||||
"""Create a new device for a domain.
|
||||
|
||||
|
||||
@@ -30,12 +30,6 @@ class XendNode:
|
||||
def cpu_bvt_slice_get(self):
|
||||
return self.xc.bvtsched_global_get()
|
||||
|
||||
def cpu_rrobin_slice_set(self, slice):
|
||||
return self.xc.rrobin_global_set(slice=slice)
|
||||
|
||||
def cpu_rrobin_slice_get(self):
|
||||
return self.xc.rrobin_global_get()
|
||||
|
||||
def info(self):
|
||||
return self.nodeinfo() + self.physinfo()
|
||||
|
||||
|
||||
@@ -107,16 +107,6 @@ class SrvDomain(SrvDir):
|
||||
val = fn(req.args, {'dom': self.dom.id})
|
||||
return val
|
||||
|
||||
def op_cpu_atropos_set(self, op, req):
|
||||
fn = FormFn(self.xd.domain_cpu_atropos_set,
|
||||
[['dom', 'str'],
|
||||
['period', 'int'],
|
||||
['slice', 'int'],
|
||||
['latency', 'int'],
|
||||
['xtratime', 'int']])
|
||||
val = fn(req.args, {'dom': self.dom.id})
|
||||
return val
|
||||
|
||||
def op_maxmem_set(self, op, req):
|
||||
fn = FormFn(self.xd.domain_maxmem_set,
|
||||
[['dom', 'str'],
|
||||
|
||||
@@ -25,12 +25,6 @@ class SrvNode(SrvDir):
|
||||
val = self.xn.reboot()
|
||||
return val
|
||||
|
||||
def op_cpu_rrobin_slice_set(self, op, req):
|
||||
fn = FormFn(self.xn.cpu_rrobin_slice_set,
|
||||
[['slice', 'int']])
|
||||
val = fn(req.args, {})
|
||||
return val
|
||||
|
||||
def op_cpu_bvt_slice_set(self, op, req):
|
||||
fn = FormFn(self.xn.cpu_bvt_slice_set,
|
||||
[['ctx_allow', 'int']])
|
||||
|
||||
@@ -132,16 +132,6 @@ class SrvDomain(SrvDir):
|
||||
val = fn(req.args, {'dom': self.dom.id})
|
||||
return val
|
||||
|
||||
def op_cpu_atropos_set(self, op, req):
|
||||
fn = FormFn(self.xd.domain_cpu_atropos_set,
|
||||
[['dom', 'str'],
|
||||
['period', 'int'],
|
||||
['slice', 'int'],
|
||||
['latency', 'int'],
|
||||
['xtratime', 'int']])
|
||||
val = fn(req.args, {'dom': self.dom.id})
|
||||
return val
|
||||
|
||||
def op_maxmem_set(self, op, req):
|
||||
fn = FormFn(self.xd.domain_maxmem_set,
|
||||
[['dom', 'str'],
|
||||
|
||||
@@ -566,40 +566,6 @@ class ProgBvtslice(Prog):
|
||||
|
||||
xm.prog(ProgBvtslice)
|
||||
|
||||
|
||||
class ProgAtropos(Prog):
|
||||
group = 'scheduler'
|
||||
name= "atropos"
|
||||
info = """Set atropos parameters."""
|
||||
|
||||
def help(self, args):
|
||||
print args[0], "DOM PERIOD SLICE LATENCY XTRATIME"
|
||||
print "\nSet atropos parameters."
|
||||
|
||||
def main(self, args):
|
||||
if len(args) != 6: self.err("%s: Invalid argument(s)" % args[0])
|
||||
dom = args[1]
|
||||
v = map(int, args[2:6])
|
||||
server.xend_domain_cpu_atropos_set(dom, *v)
|
||||
|
||||
xm.prog(ProgAtropos)
|
||||
|
||||
class ProgRrobin(Prog):
|
||||
group = 'scheduler'
|
||||
name = "rrobin"
|
||||
info = """Set round robin slice."""
|
||||
|
||||
def help(self, args):
|
||||
print args[0], "SLICE"
|
||||
print "\nSet round robin scheduler slice."
|
||||
|
||||
def main(self, args):
|
||||
if len(args) != 2: self.err("%s: Invalid argument(s)" % args[0])
|
||||
rrslice = int(args[1])
|
||||
server.xend_node_rrobin_set(rrslice)
|
||||
|
||||
xm.prog(ProgRrobin)
|
||||
|
||||
class ProgInfo(Prog):
|
||||
group = 'host'
|
||||
name = "info"
|
||||
|
||||