mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
bitkeeper revision 1.1159.1.250 (41778fccML9t77yAOOuhoIJlCQGgKQ)
Remove fbvt scheduler.
This commit is contained in:
1 parent
de8916b3fc
commit
cf9401b0f4
15 files changed
-967
No files matched your search
@@ -491,92 +491,6 @@ static PyObject *pyxc_bvtsched_domain_get(PyObject *self,
|
||||
"warpu", warpu);
|
||||
}
|
||||
|
||||
static PyObject *pyxc_fbvtsched_global_set(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
XcObject *xc = (XcObject *)self;
|
||||
|
||||
unsigned long ctx_allow;
|
||||
|
||||
static char *kwd_list[] = { "ctx_allow", NULL };
|
||||
|
||||
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "l", kwd_list, &ctx_allow) )
|
||||
return NULL;
|
||||
|
||||
if ( xc_fbvtsched_global_set(xc->xc_handle, ctx_allow) != 0 )
|
||||
return PyErr_SetFromErrno(xc_error);
|
||||
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_fbvtsched_global_get(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
XcObject *xc = (XcObject *)self;
|
||||
|
||||
unsigned long ctx_allow;
|
||||
|
||||
if ( !PyArg_ParseTuple(args, "") )
|
||||
return NULL;
|
||||
|
||||
if ( xc_fbvtsched_global_get(xc->xc_handle, &ctx_allow) != 0 )
|
||||
return PyErr_SetFromErrno(xc_error);
|
||||
|
||||
return Py_BuildValue("s:l", "ctx_allow", ctx_allow);
|
||||
}
|
||||
|
||||
static PyObject *pyxc_fbvtsched_domain_set(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
XcObject *xc = (XcObject *)self;
|
||||
|
||||
u32 dom;
|
||||
unsigned long mcuadv, warp, warpl, warpu;
|
||||
|
||||
static char *kwd_list[] = { "dom", "mcuadv", "warp", "warpl",
|
||||
"warpu", NULL };
|
||||
|
||||
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "illll", kwd_list,
|
||||
&dom, &mcuadv, &warp, &warpl, &warpu) )
|
||||
return NULL;
|
||||
|
||||
if ( xc_fbvtsched_domain_set(xc->xc_handle, dom, mcuadv,
|
||||
warp, warpl, warpu) != 0 )
|
||||
return PyErr_SetFromErrno(xc_error);
|
||||
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_fbvtsched_domain_get(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
XcObject *xc = (XcObject *)self;
|
||||
u32 dom;
|
||||
unsigned long mcuadv, warp, warpl, warpu;
|
||||
|
||||
static char *kwd_list[] = { "dom", NULL };
|
||||
|
||||
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, &dom) )
|
||||
return NULL;
|
||||
|
||||
if ( xc_fbvtsched_domain_get(xc->xc_handle, dom, &mcuadv, &warp,
|
||||
&warpl, &warpu) != 0 )
|
||||
return PyErr_SetFromErrno(xc_error);
|
||||
|
||||
return Py_BuildValue("{s:i,s:l,s:l,s:l,s:l}",
|
||||
"domain", dom,
|
||||
"mcuadv", mcuadv,
|
||||
"warp", warp,
|
||||
"warpl", warpl,
|
||||
"warpu", warpu);
|
||||
}
|
||||
|
||||
static PyObject *pyxc_evtchn_bind_interdomain(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
@@ -1074,44 +988,6 @@ static PyMethodDef pyxc_methods[] = {
|
||||
" warpl [long]: Warp limit,\n"
|
||||
},
|
||||
|
||||
{ "fbvtsched_global_set",
|
||||
(PyCFunction)pyxc_fbvtsched_global_set,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
"Set global tuning parameters for Fair Borrowed Virtual Time scheduler.\n"
|
||||
" ctx_allow [int]: Minimal guaranteed quantum.\n\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "fbvtsched_global_get",
|
||||
(PyCFunction)pyxc_fbvtsched_global_get,
|
||||
METH_KEYWORDS, "\n"
|
||||
"Get global tuning parameters for FBVT scheduler.\n"
|
||||
"Returns: [dict]:\n"
|
||||
" ctx_allow [int]: context switch allowance\n" },
|
||||
|
||||
{ "fbvtsched_domain_set",
|
||||
(PyCFunction)pyxc_fbvtsched_domain_set,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
"Set per-domain tuning parameters for Fair Borrowed Virtual Time scheduler.\n"
|
||||
" dom [int]: Identifier of domain to be tuned.\n"
|
||||
" mcuadv [int]: Proportional to the inverse of the domain's weight.\n"
|
||||
" warp [int]: How far to warp domain's EVT on unblock.\n"
|
||||
" warpl [int]: How long the domain can run warped.\n"
|
||||
" warpu [int]: How long before the domain can warp again.\n\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "fbvtsched_domain_get",
|
||||
(PyCFunction)pyxc_fbvtsched_domain_get,
|
||||
METH_KEYWORDS, "\n"
|
||||
"Get per-domain tuning parameters under the FBVT scheduler.\n"
|
||||
" dom [int]: Identifier of domain to be queried.\n"
|
||||
"Returns [dict]:\n"
|
||||
" domain [int]: Domain ID.\n"
|
||||
" mcuadv [long]: MCU Advance.\n"
|
||||
" warp [long]: Warp.\n"
|
||||
" warpu [long]: Unwarp requirement.\n"
|
||||
" warpl [long]: Warp limit,\n"
|
||||
},
|
||||
|
||||
{ "atropos_domain_set",
|
||||
(PyCFunction)pyxc_atropos_domain_set,
|
||||
METH_KEYWORDS, "\n"
|
||||
|
||||
@@ -195,11 +195,6 @@ class Xend:
|
||||
{'op' : 'cpu_bvt_slice_set',
|
||||
'ctx_allow' : ctx_allow })
|
||||
|
||||
def xend_node_cpu_fbvt_slice_set(self, ctx_allow):
|
||||
return self.xendPost(self.nodeurl(),
|
||||
{'op' : 'cpu_fbvt_slice_set',
|
||||
'ctx_allow' : ctx_allow })
|
||||
|
||||
def xend_domains(self):
|
||||
return self.xendGet(self.domainurl())
|
||||
|
||||
@@ -264,14 +259,6 @@ class Xend:
|
||||
'warpl' : warpl,
|
||||
'warpu' : warpu })
|
||||
|
||||
def xend_domain_cpu_fbvt_set(self, id, mcuadv, warp, warpl, warpu):
|
||||
return self.xendPost(self.domainurl(id),
|
||||
{'op' : 'cpu_fbvt_set',
|
||||
'mcuadv' : mcuadv,
|
||||
'warp' : warp,
|
||||
'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',
|
||||
|
||||
@@ -651,25 +651,6 @@ class XendDomain:
|
||||
except Exception, ex:
|
||||
raise XendError(str(ex))
|
||||
|
||||
def domain_cpu_fbvt_set(self, id, mcuadv, warp, warpl, warpu):
|
||||
"""Set FBVT (Fair Borrowed Virtual Time) scheduler parameters for a domain.
|
||||
"""
|
||||
dominfo = self.domain_lookup(id)
|
||||
try:
|
||||
return xc.fbvtsched_domain_set(dom=dominfo.dom, mcuadv=mcuadv,
|
||||
warp=warp, warpl=warpl, warpu=warpu)
|
||||
except Exception, ex:
|
||||
raise XendError(str(ex))
|
||||
|
||||
def domain_cpu_fbvt_get(self, id):
|
||||
"""Get FBVT (Fair Borrowed Virtual Time) scheduler parameters for a domain.
|
||||
"""
|
||||
dominfo = self.domain_lookup(id)
|
||||
try:
|
||||
return xc.fbvtsched_domain_get(dominfo.dom)
|
||||
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.
|
||||
"""
|
||||
|
||||
@@ -30,12 +30,6 @@ class XendNode:
|
||||
def cpu_bvt_slice_get(self):
|
||||
return self.xc.bvtsched_global_get()
|
||||
|
||||
def cpu_fbvt_slice_set(self, ctx_allow):
|
||||
return self.xc.bvtsched_global_set(ctx_allow=ctx_allow)
|
||||
|
||||
def cpu_fbvt_slice_get(self):
|
||||
return self.xc.bvtsched_global_get()
|
||||
|
||||
def cpu_rrobin_slice_set(self, slice):
|
||||
return self.xc.rrobin_global_set(slice=slice)
|
||||
|
||||
|
||||
@@ -122,16 +122,6 @@ class SrvDomain(SrvDir):
|
||||
val = fn(req.args, {'dom': self.dom.id})
|
||||
return val
|
||||
|
||||
def op_cpu_fbvt_set(self, op, req):
|
||||
fn = FormFn(self.xd.domain_cpu_fbvt_set,
|
||||
[['dom', 'str'],
|
||||
['mcuadv', 'int'],
|
||||
['warp', 'int'],
|
||||
['warpl', 'int'],
|
||||
['warpu', 'int']])
|
||||
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'],
|
||||
|
||||
@@ -37,12 +37,6 @@ class SrvNode(SrvDir):
|
||||
val = fn(req.args, {})
|
||||
return val
|
||||
|
||||
def op_cpu_fbvt_slice_set(self, op, req):
|
||||
fn = FormFn(self.xn.cpu_fbvt_slice_set,
|
||||
[['ctx_allow', 'int']])
|
||||
val = fn(req.args, {})
|
||||
return val
|
||||
|
||||
def render_POST(self, req):
|
||||
return self.perform(req)
|
||||
|
||||
|
||||
@@ -552,40 +552,6 @@ class ProgBvtslice(Prog):
|
||||
|
||||
xm.prog(ProgBvtslice)
|
||||
|
||||
class ProgFbvt(Prog):
|
||||
group = 'scheduler'
|
||||
name = "fbvt"
|
||||
info = """Set FBVT scheduler parameters."""
|
||||
|
||||
def help(self, args):
|
||||
print args[0], "DOM MCUADV WARP WARPL WARPU"
|
||||
print '\nSet Fair Borrowed Virtual Time scheduler 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_fbvt_set(dom, *v)
|
||||
|
||||
xm.prog(ProgFbvt)
|
||||
|
||||
class ProgFbvtslice(Prog):
|
||||
group = 'scheduler'
|
||||
name = "fbvt_ctxallow"
|
||||
info = """Set the FBVT scheduler context switch allowance."""
|
||||
|
||||
def help(self, args):
|
||||
print args[0], 'CTX_ALLOW'
|
||||
print '\nSet Fair Borrowed Virtual Time scheduler context switch allowance.'
|
||||
|
||||
def main(self, args):
|
||||
if len(args) < 2: self.err('%s: Missing context switch allowance.'
|
||||
% args[0])
|
||||
ctx_allow = int(args[1])
|
||||
server.xend_node_cpu_fbvt_slice_set(ctx_allow)
|
||||
|
||||
xm.prog(ProgFbvtslice)
|
||||
|
||||
|
||||
class ProgAtropos(Prog):
|
||||
group = 'scheduler'
|
||||
|
||||