[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC PATCH v2 6/7] Changed slice to budget in libxc for the sedf scheduler



From: Robbie VanVossen <robert.vanvossen@xxxxxxxxxxxxxxx>

Signed-off-by: Robert VanVossen <Robert.VanVossen@xxxxxxxxxxxxxxx>
Signed-off-by: Nathan Studer <nate.studer@xxxxxxxxx>

---
 tools/libxc/xc_sedf.c             |    8 ++++----
 tools/libxc/xenctrl.h             |    4 ++--
 tools/python/xen/lowlevel/xc/xc.c |   20 ++++++++++----------
 xen/include/public/domctl.h       |    2 +-
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/tools/libxc/xc_sedf.c b/tools/libxc/xc_sedf.c
index 81ff133..ab67546 100644
--- a/tools/libxc/xc_sedf.c
+++ b/tools/libxc/xc_sedf.c
@@ -28,7 +28,7 @@ int xc_sedf_domain_set(
     xc_interface *xch,
     uint32_t domid,
     uint64_t period,
-    uint64_t slice,
+    uint64_t budget,
     uint16_t soft)
 {
     DECLARE_DOMCTL;
@@ -40,7 +40,7 @@ int xc_sedf_domain_set(
     domctl.u.scheduler_op.cmd = XEN_DOMCTL_SCHEDOP_putinfo;
 
     p->period    = period;
-    p->slice     = slice;
+    p->budget    = budget;
     p->soft      = soft;
     return do_domctl(xch, &domctl);
 }
@@ -49,7 +49,7 @@ int xc_sedf_domain_get(
     xc_interface *xch,
     uint32_t domid,
     uint64_t *period,
-    uint64_t *slice,
+    uint64_t *budget,
     uint16_t *soft)
 {
     DECLARE_DOMCTL;
@@ -64,7 +64,7 @@ int xc_sedf_domain_get(
     ret = do_domctl(xch, &domctl);
 
     *period    = p->period;
-    *slice     = p->slice;
+    *budget    = p->budget;
     *soft      = p->soft;
     return ret;
 }
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index d5cfdb8..4677b58 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -766,13 +766,13 @@ int xc_shadow_control(xc_interface *xch,
 int xc_sedf_domain_set(xc_interface *xch,
                        uint32_t domid,
                        uint64_t period,
-                       uint64_t slice, 
+                       uint64_t budget, 
                        uint16_t soft);
 
 int xc_sedf_domain_get(xc_interface *xch,
                        uint32_t domid,
                        uint64_t *period,
-                       uint64_t *slice,
+                       uint64_t *budget,
                        uint16_t *soft);
 
 int xc_sched_credit_domain_set(xc_interface *xch,
diff --git a/tools/python/xen/lowlevel/xc/xc.c 
b/tools/python/xen/lowlevel/xc/xc.c
index bf10165..ffe4a38 100644
--- a/tools/python/xen/lowlevel/xc/xc.c
+++ b/tools/python/xen/lowlevel/xc/xc.c
@@ -1471,17 +1471,17 @@ static PyObject *pyxc_sedf_domain_set(XcObject *self,
                                       PyObject *kwds)
 {
     uint32_t domid;
-    uint64_t period, slice;
+    uint64_t period, budget;
     uint16_t soft;
 
-    static char *kwd_list[] = { "domid", "period", "slice", "soft",NULL };
+    static char *kwd_list[] = { "domid", "period", "budget", "soft",NULL };
     
     if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLi", kwd_list, 
-                                     &domid, &period, &slice, &soft) )
+                                     &domid, &period, &budget, &soft) )
 
         return NULL;
    if ( xc_sedf_domain_set(self->xc_handle, domid, period,
-                           slice, soft) != 0 )
+                           budget, soft) != 0 )
         return pyxc_error_to_exception(self->xc_handle);
 
     Py_INCREF(zero);
@@ -1491,20 +1491,20 @@ static PyObject *pyxc_sedf_domain_set(XcObject *self,
 static PyObject *pyxc_sedf_domain_get(XcObject *self, PyObject *args)
 {
     uint32_t domid;
-    uint64_t period, slice;
+    uint64_t period, budget;
     uint16_t soft;
     
     if(!PyArg_ParseTuple(args, "i", &domid))
         return NULL;
     
     if (xc_sedf_domain_get(self->xc_handle, domid, &period,
-                           &slice, &soft))
+                           &budget, &soft))
         return pyxc_error_to_exception(self->xc_handle);
 
     return Py_BuildValue("{s:i,s:L,s:L,s:i}",
-                         "domid",    domid,
+                         "domid",     domid,
                          "period",    period,
-                         "slice",     slice,
+                         "budget",    budget,
                          "soft",      soft);
 }
 
@@ -2541,7 +2541,7 @@ static PyMethodDef pyxc_methods[] = {
       "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"
+      " budget     [long]: domain's slice per period\n"
       " soft      [int]:  domain is a soft task?\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
@@ -2554,7 +2554,7 @@ static PyMethodDef pyxc_methods[] = {
       "Returns:   [dict]\n"
       " domain    [int]: domain ID\n"
       " period    [long]: scheduler period\n"
-      " slice     [long]: CPU reservation per period\n"
+      " budget     [long]: CPU reservation per period\n"
       " soft      [int]:  domain is a soft task?\n"},
     
     { "sched_credit_domain_set",
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 6e143d3..0e8d14a 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -330,7 +330,7 @@ struct xen_domctl_scheduler_op {
     union {
         struct xen_domctl_sched_sedf {
             uint64_aligned_t period;
-            uint64_aligned_t slice;
+            uint64_aligned_t budget;
             uint32_t soft;
         } sedf;
         struct xen_domctl_sched_credit {
-- 
1.7.9.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.