ia64/xen-unstable
changeset 10206:71fa0e0d520c
Rename csched -> sched_credit/sched-credit in control plane.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Sat May 27 10:13:27 2006 +0100 (2006-05-27) |
parents | 954f4dea9da6 |
children | 444abe25611f |
files | tools/libxc/xc_csched.c tools/libxc/xenctrl.h tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/XendDomain.py tools/python/xen/xend/server/SrvDomain.py tools/python/xen/xm/main.py xen/include/public/sched_ctl.h |
line diff
1.1 --- a/tools/libxc/xc_csched.c Fri May 26 17:22:30 2006 +0100 1.2 +++ b/tools/libxc/xc_csched.c Sat May 27 10:13:27 2006 +0100 1.3 @@ -12,10 +12,10 @@ 1.4 1.5 1.6 int 1.7 -xc_csched_domain_set( 1.8 +xc_sched_credit_domain_set( 1.9 int xc_handle, 1.10 uint32_t domid, 1.11 - struct csched_domain *sdom) 1.12 + struct sched_credit_adjdom *sdom) 1.13 { 1.14 DECLARE_DOM0_OP; 1.15 1.16 @@ -29,10 +29,10 @@ xc_csched_domain_set( 1.17 } 1.18 1.19 int 1.20 -xc_csched_domain_get( 1.21 +xc_sched_credit_domain_get( 1.22 int xc_handle, 1.23 uint32_t domid, 1.24 - struct csched_domain *sdom) 1.25 + struct sched_credit_adjdom *sdom) 1.26 { 1.27 DECLARE_DOM0_OP; 1.28 int err;
2.1 --- a/tools/libxc/xenctrl.h Fri May 26 17:22:30 2006 +0100 2.2 +++ b/tools/libxc/xenctrl.h Sat May 27 10:13:27 2006 +0100 2.3 @@ -354,13 +354,13 @@ int xc_sedf_domain_get(int xc_handle, 2.4 uint64_t *latency, uint16_t *extratime, 2.5 uint16_t *weight); 2.6 2.7 -int xc_csched_domain_set(int xc_handle, 2.8 - uint32_t domid, 2.9 - struct csched_domain *sdom); 2.10 +int xc_sched_credit_domain_set(int xc_handle, 2.11 + uint32_t domid, 2.12 + struct sched_credit_adjdom *sdom); 2.13 2.14 -int xc_csched_domain_get(int xc_handle, 2.15 - uint32_t domid, 2.16 - struct csched_domain *sdom); 2.17 +int xc_sched_credit_domain_get(int xc_handle, 2.18 + uint32_t domid, 2.19 + struct sched_credit_adjdom *sdom); 2.20 2.21 typedef evtchn_status_t xc_evtchn_status_t; 2.22
3.1 --- a/tools/python/xen/lowlevel/xc/xc.c Fri May 26 17:22:30 2006 +0100 3.2 +++ b/tools/python/xen/lowlevel/xc/xc.c Sat May 27 10:13:27 2006 +0100 3.3 @@ -716,16 +716,16 @@ static PyObject *pyxc_sedf_domain_get(Xc 3.4 "weight", weight); 3.5 } 3.6 3.7 -static PyObject *pyxc_csched_domain_set(XcObject *self, 3.8 - PyObject *args, 3.9 - PyObject *kwds) 3.10 +static PyObject *pyxc_sched_credit_domain_set(XcObject *self, 3.11 + PyObject *args, 3.12 + PyObject *kwds) 3.13 { 3.14 uint32_t domid; 3.15 uint16_t weight; 3.16 uint16_t cap; 3.17 static char *kwd_list[] = { "dom", "weight", "cap", NULL }; 3.18 static char kwd_type[] = "I|HH"; 3.19 - struct csched_domain sdom; 3.20 + struct sched_credit_adjdom sdom; 3.21 3.22 weight = 0; 3.23 cap = (uint16_t)~0U; 3.24 @@ -736,22 +736,22 @@ static PyObject *pyxc_csched_domain_set( 3.25 sdom.weight = weight; 3.26 sdom.cap = cap; 3.27 3.28 - if ( xc_csched_domain_set(self->xc_handle, domid, &sdom) != 0 ) 3.29 + if ( xc_sched_credit_domain_set(self->xc_handle, domid, &sdom) != 0 ) 3.30 return PyErr_SetFromErrno(xc_error); 3.31 3.32 Py_INCREF(zero); 3.33 return zero; 3.34 } 3.35 3.36 -static PyObject *pyxc_csched_domain_get(XcObject *self, PyObject *args) 3.37 +static PyObject *pyxc_sched_credit_domain_get(XcObject *self, PyObject *args) 3.38 { 3.39 uint32_t domid; 3.40 - struct csched_domain sdom; 3.41 + struct sched_credit_adjdom sdom; 3.42 3.43 if( !PyArg_ParseTuple(args, "I", &domid) ) 3.44 return NULL; 3.45 3.46 - if ( xc_csched_domain_get(self->xc_handle, domid, &sdom) != 0 ) 3.47 + if ( xc_sched_credit_domain_get(self->xc_handle, domid, &sdom) != 0 ) 3.48 return PyErr_SetFromErrno(xc_error); 3.49 3.50 return Py_BuildValue("{s:H,s:H}", 3.51 @@ -1084,8 +1084,8 @@ static PyMethodDef pyxc_methods[] = { 3.52 " latency [long]: domain's wakeup latency hint\n" 3.53 " extratime [int]: domain aware of extratime?\n"}, 3.54 3.55 - { "csched_domain_set", 3.56 - (PyCFunction)pyxc_csched_domain_set, 3.57 + { "sched_credit_domain_set", 3.58 + (PyCFunction)pyxc_sched_credit_domain_set, 3.59 METH_KEYWORDS, "\n" 3.60 "Set the scheduling parameters for a domain when running with the\n" 3.61 "SMP credit scheduler.\n" 3.62 @@ -1093,8 +1093,8 @@ static PyMethodDef pyxc_methods[] = { 3.63 " weight [short]: domain's scheduling weight\n" 3.64 "Returns: [int] 0 on success; -1 on error.\n" }, 3.65 3.66 - { "csched_domain_get", 3.67 - (PyCFunction)pyxc_csched_domain_get, 3.68 + { "sched_credit_domain_get", 3.69 + (PyCFunction)pyxc_sched_credit_domain_get, 3.70 METH_VARARGS, "\n" 3.71 "Get the scheduling parameters for a domain when running with the\n" 3.72 "SMP credit scheduler.\n"
4.1 --- a/tools/python/xen/xend/XendDomain.py Fri May 26 17:22:30 2006 +0100 4.2 +++ b/tools/python/xen/xend/XendDomain.py Sat May 27 10:13:27 2006 +0100 4.3 @@ -522,25 +522,25 @@ class XendDomain: 4.4 except Exception, ex: 4.5 raise XendError(str(ex)) 4.6 4.7 - def domain_csched_get(self, domid): 4.8 + def domain_sched_credit_get(self, domid): 4.9 """Get credit scheduler parameters for a domain. 4.10 """ 4.11 dominfo = self.domain_lookup_by_name_or_id_nr(domid) 4.12 if not dominfo: 4.13 raise XendInvalidDomain(str(domid)) 4.14 try: 4.15 - return xc.csched_domain_get(dominfo.getDomid()) 4.16 + return xc.sched_credit_domain_get(dominfo.getDomid()) 4.17 except Exception, ex: 4.18 raise XendError(str(ex)) 4.19 4.20 - def domain_csched_set(self, domid, weight, cap): 4.21 + def domain_sched_credit_set(self, domid, weight, cap): 4.22 """Set credit scheduler parameters for a domain. 4.23 """ 4.24 dominfo = self.domain_lookup_by_name_or_id_nr(domid) 4.25 if not dominfo: 4.26 raise XendInvalidDomain(str(domid)) 4.27 try: 4.28 - return xc.csched_domain_set(dominfo.getDomid(), weight, cap) 4.29 + return xc.sched_credit_domain_set(dominfo.getDomid(), weight, cap) 4.30 except Exception, ex: 4.31 raise XendError(str(ex)) 4.32
5.1 --- a/tools/python/xen/xend/server/SrvDomain.py Fri May 26 17:22:30 2006 +0100 5.2 +++ b/tools/python/xen/xend/server/SrvDomain.py Sat May 27 10:13:27 2006 +0100 5.3 @@ -132,15 +132,15 @@ class SrvDomain(SrvDir): 5.4 val = fn(req.args, {'dom': self.dom.domid}) 5.5 return val 5.6 5.7 - def op_domain_csched_get(self, _, req): 5.8 - fn = FormFn(self.xd.domain_csched_get, 5.9 + def op_domain_sched_credit_get(self, _, req): 5.10 + fn = FormFn(self.xd.domain_sched_credit_get, 5.11 [['dom', 'int']]) 5.12 val = fn(req.args, {'dom': self.dom.domid}) 5.13 return val 5.14 5.15 5.16 - def op_domain_csched_set(self, _, req): 5.17 - fn = FormFn(self.xd.domain_csched_set, 5.18 + def op_domain_sched_credit_set(self, _, req): 5.19 + fn = FormFn(self.xd.domain_sched_credit_set, 5.20 [['dom', 'int'], 5.21 ['weight', 'int']]) 5.22 val = fn(req.args, {'dom': self.dom.domid})
6.1 --- a/tools/python/xen/xm/main.py Fri May 26 17:22:30 2006 +0100 6.2 +++ b/tools/python/xen/xm/main.py Sat May 27 10:13:27 2006 +0100 6.3 @@ -99,7 +99,7 @@ sched_sedf_help = "sched-sedf [DOM] [OPT 6.4 specifies another way of setting a domain's\n\ 6.5 cpu period/slice." 6.6 6.7 -csched_help = "csched Set or get credit scheduler parameters" 6.8 +sched_credit_help = "sched-credit Set or get credit scheduler parameters" 6.9 block_attach_help = """block-attach <DomId> <BackDev> <FrontDev> <Mode> 6.10 [BackDomId] Create a new virtual block device""" 6.11 block_detach_help = """block-detach <DomId> <DevId> Destroy a domain's virtual block device, 6.12 @@ -175,7 +175,7 @@ host_commands = [ 6.13 ] 6.14 6.15 scheduler_commands = [ 6.16 - "csched", 6.17 + "sched-credit", 6.18 "sched-bvt", 6.19 "sched-bvt-ctxallow", 6.20 "sched-sedf", 6.21 @@ -737,11 +737,11 @@ def xm_sched_sedf(args): 6.22 else: 6.23 print_sedf(sedf_info) 6.24 6.25 -def xm_csched(args): 6.26 - usage_msg = """Csched: Set or get credit scheduler parameters 6.27 +def xm_sched_credit(args): 6.28 + usage_msg = """sched-credit: Set or get credit scheduler parameters 6.29 Usage: 6.30 6.31 - csched -d domain [-w weight] [-c cap] 6.32 + sched-credit -d domain [-w weight] [-c cap] 6.33 """ 6.34 try: 6.35 opts, args = getopt.getopt(args[0:], "d:w:c:", 6.36 @@ -769,14 +769,14 @@ def xm_csched(args): 6.37 sys.exit(1) 6.38 6.39 if weight is None and cap is None: 6.40 - print server.xend.domain.csched_get(domain) 6.41 + print server.xend.domain.sched_credit_get(domain) 6.42 else: 6.43 if weight is None: 6.44 weight = int(0) 6.45 if cap is None: 6.46 cap = int(~0) 6.47 6.48 - err = server.xend.domain.csched_set(domain, weight, cap) 6.49 + err = server.xend.domain.sched_credit_set(domain, weight, cap) 6.50 if err != 0: 6.51 print err 6.52 6.53 @@ -1076,7 +1076,7 @@ commands = { 6.54 "sched-bvt": xm_sched_bvt, 6.55 "sched-bvt-ctxallow": xm_sched_bvt_ctxallow, 6.56 "sched-sedf": xm_sched_sedf, 6.57 - "csched": xm_csched, 6.58 + "sched-credit": xm_sched_credit, 6.59 # block 6.60 "block-attach": xm_block_attach, 6.61 "block-detach": xm_block_detach,
7.1 --- a/xen/include/public/sched_ctl.h Fri May 26 17:22:30 2006 +0100 7.2 +++ b/xen/include/public/sched_ctl.h Sat May 27 10:13:27 2006 +0100 7.3 @@ -49,7 +49,7 @@ struct sched_adjdom_cmd { 7.4 uint32_t extratime; 7.5 uint32_t weight; 7.6 } sedf; 7.7 - struct csched_domain { 7.8 + struct sched_credit_adjdom { 7.9 uint16_t weight; 7.10 uint16_t cap; 7.11 } credit;