Rename csched -> sched_credit/sched-credit in control plane.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-05-27 10:13:27 +01:00
1 parent c263397874
commit 3903e920a1
7 files changed
+39 -39

No files matched your search

+12 -12
View File
@@ -716,16 +716,16 @@ static PyObject *pyxc_sedf_domain_get(XcObject *self, PyObject *args)
"weight", weight);
}
static PyObject *pyxc_csched_domain_set(XcObject *self,
PyObject *args,
PyObject *kwds)
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[] = { "dom", "weight", "cap", NULL };
static char kwd_type[] = "I|HH";
struct csched_domain sdom;
struct sched_credit_adjdom sdom;
weight = 0;
cap = (uint16_t)~0U;
@@ -736,22 +736,22 @@ static PyObject *pyxc_csched_domain_set(XcObject *self,
sdom.weight = weight;
sdom.cap = cap;
if ( xc_csched_domain_set(self->xc_handle, domid, &sdom) != 0 )
if ( xc_sched_credit_domain_set(self->xc_handle, domid, &sdom) != 0 )
return PyErr_SetFromErrno(xc_error);
Py_INCREF(zero);
return zero;
}
static PyObject *pyxc_csched_domain_get(XcObject *self, PyObject *args)
static PyObject *pyxc_sched_credit_domain_get(XcObject *self, PyObject *args)
{
uint32_t domid;
struct csched_domain sdom;
struct sched_credit_adjdom sdom;
if( !PyArg_ParseTuple(args, "I", &domid) )
return NULL;
if ( xc_csched_domain_get(self->xc_handle, domid, &sdom) != 0 )
if ( xc_sched_credit_domain_get(self->xc_handle, domid, &sdom) != 0 )
return PyErr_SetFromErrno(xc_error);
return Py_BuildValue("{s:H,s:H}",
@@ -1084,8 +1084,8 @@ static PyMethodDef pyxc_methods[] = {
" latency [long]: domain's wakeup latency hint\n"
" extratime [int]: domain aware of extratime?\n"},
{ "csched_domain_set",
(PyCFunction)pyxc_csched_domain_set,
{ "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"
@@ -1093,8 +1093,8 @@ static PyMethodDef pyxc_methods[] = {
" weight [short]: domain's scheduling weight\n"
"Returns: [int] 0 on success; -1 on error.\n" },
{ "csched_domain_get",
(PyCFunction)pyxc_csched_domain_get,
{ "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"
+4 -4
View File
@@ -522,25 +522,25 @@ class XendDomain:
except Exception, ex:
raise XendError(str(ex))
def domain_csched_get(self, domid):
def domain_sched_credit_get(self, domid):
"""Get credit scheduler parameters for a domain.
"""
dominfo = self.domain_lookup_by_name_or_id_nr(domid)
if not dominfo:
raise XendInvalidDomain(str(domid))
try:
return xc.csched_domain_get(dominfo.getDomid())
return xc.sched_credit_domain_get(dominfo.getDomid())
except Exception, ex:
raise XendError(str(ex))
def domain_csched_set(self, domid, weight, cap):
def domain_sched_credit_set(self, domid, weight, cap):
"""Set credit scheduler parameters for a domain.
"""
dominfo = self.domain_lookup_by_name_or_id_nr(domid)
if not dominfo:
raise XendInvalidDomain(str(domid))
try:
return xc.csched_domain_set(dominfo.getDomid(), weight, cap)
return xc.sched_credit_domain_set(dominfo.getDomid(), weight, cap)
except Exception, ex:
raise XendError(str(ex))
+4 -4
View File
@@ -132,15 +132,15 @@ class SrvDomain(SrvDir):
val = fn(req.args, {'dom': self.dom.domid})
return val
def op_domain_csched_get(self, _, req):
fn = FormFn(self.xd.domain_csched_get,
def op_domain_sched_credit_get(self, _, req):
fn = FormFn(self.xd.domain_sched_credit_get,
[['dom', 'int']])
val = fn(req.args, {'dom': self.dom.domid})
return val
def op_domain_csched_set(self, _, req):
fn = FormFn(self.xd.domain_csched_set,
def op_domain_sched_credit_set(self, _, req):
fn = FormFn(self.xd.domain_sched_credit_set,
[['dom', 'int'],
['weight', 'int']])
val = fn(req.args, {'dom': self.dom.domid})
+8 -8
View File
@@ -99,7 +99,7 @@ sched_sedf_help = "sched-sedf [DOM] [OPTIONS] Show|Set simple EDF paramete
specifies another way of setting a domain's\n\
cpu period/slice."
csched_help = "csched Set or get credit scheduler parameters"
sched_credit_help = "sched-credit Set or get credit scheduler parameters"
block_attach_help = """block-attach <DomId> <BackDev> <FrontDev> <Mode>
[BackDomId] Create a new virtual block device"""
block_detach_help = """block-detach <DomId> <DevId> Destroy a domain's virtual block device,
@@ -175,7 +175,7 @@ host_commands = [
]
scheduler_commands = [
"csched",
"sched-credit",
"sched-bvt",
"sched-bvt-ctxallow",
"sched-sedf",
@@ -737,11 +737,11 @@ def xm_sched_sedf(args):
else:
print_sedf(sedf_info)
def xm_csched(args):
usage_msg = """Csched: Set or get credit scheduler parameters
def xm_sched_credit(args):
usage_msg = """sched-credit: Set or get credit scheduler parameters
Usage:
csched -d domain [-w weight] [-c cap]
sched-credit -d domain [-w weight] [-c cap]
"""
try:
opts, args = getopt.getopt(args[0:], "d:w:c:",
@@ -769,14 +769,14 @@ def xm_csched(args):
sys.exit(1)
if weight is None and cap is None:
print server.xend.domain.csched_get(domain)
print server.xend.domain.sched_credit_get(domain)
else:
if weight is None:
weight = int(0)
if cap is None:
cap = int(~0)
err = server.xend.domain.csched_set(domain, weight, cap)
err = server.xend.domain.sched_credit_set(domain, weight, cap)
if err != 0:
print err
@@ -1076,7 +1076,7 @@ commands = {
"sched-bvt": xm_sched_bvt,
"sched-bvt-ctxallow": xm_sched_bvt_ctxallow,
"sched-sedf": xm_sched_sedf,
"csched": xm_csched,
"sched-credit": xm_sched_credit,
# block
"block-attach": xm_block_attach,
"block-detach": xm_block_detach,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.