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

[Xen-devel] [RFC PATCH v2 4/7] Add cbs parameter support and removed sedf parameters from libxc



From: Robbie VanVossen <robert.vanvossen@xxxxxxxxxxxxxxx>

This file may also need something similar to the LIBXL_API_VERSION gate.

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

---
 tools/libxc/xc_sedf.c             |   16 ++++------------
 tools/libxc/xenctrl.h             |   12 ++++++------
 tools/python/xen/lowlevel/xc/xc.c |   34 +++++++++++++++-------------------
 xen/include/public/domctl.h       |    4 +---
 4 files changed, 26 insertions(+), 40 deletions(-)

diff --git a/tools/libxc/xc_sedf.c b/tools/libxc/xc_sedf.c
index db372ca..81ff133 100644
--- a/tools/libxc/xc_sedf.c
+++ b/tools/libxc/xc_sedf.c
@@ -29,9 +29,7 @@ int xc_sedf_domain_set(
     uint32_t domid,
     uint64_t period,
     uint64_t slice,
-    uint64_t latency,
-    uint16_t extratime,
-    uint16_t weight)
+    uint16_t soft)
 {
     DECLARE_DOMCTL;
     struct xen_domctl_sched_sedf *p = &domctl.u.scheduler_op.u.sedf;
@@ -43,9 +41,7 @@ int xc_sedf_domain_set(
 
     p->period    = period;
     p->slice     = slice;
-    p->latency   = latency;
-    p->extratime = extratime;
-    p->weight    = weight;
+    p->soft      = soft;
     return do_domctl(xch, &domctl);
 }
 
@@ -54,9 +50,7 @@ int xc_sedf_domain_get(
     uint32_t domid,
     uint64_t *period,
     uint64_t *slice,
-    uint64_t *latency,
-    uint16_t *extratime,
-    uint16_t *weight)
+    uint16_t *soft)
 {
     DECLARE_DOMCTL;
     int ret;
@@ -71,8 +65,6 @@ int xc_sedf_domain_get(
 
     *period    = p->period;
     *slice     = p->slice;
-    *latency   = p->latency;
-    *extratime = p->extratime;
-    *weight    = p->weight;
+    *soft      = p->soft;
     return ret;
 }
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 02129f7..d5cfdb8 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -765,15 +765,15 @@ 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 latency, uint16_t extratime,
-                       uint16_t weight);
+                       uint64_t period,
+                       uint64_t slice, 
+                       uint16_t soft);
 
 int xc_sedf_domain_get(xc_interface *xch,
                        uint32_t domid,
-                       uint64_t* period, uint64_t *slice,
-                       uint64_t *latency, uint16_t *extratime,
-                       uint16_t *weight);
+                       uint64_t *period,
+                       uint64_t *slice,
+                       uint16_t *soft);
 
 int xc_sched_credit_domain_set(xc_interface *xch,
                                uint32_t domid,
diff --git a/tools/python/xen/lowlevel/xc/xc.c 
b/tools/python/xen/lowlevel/xc/xc.c
index cb34446..bf10165 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, latency;
-    uint16_t extratime, weight;
-    static char *kwd_list[] = { "domid", "period", "slice",
-                                "latency", "extratime", "weight",NULL };
+    uint64_t period, slice;
+    uint16_t soft;
+
+    static char *kwd_list[] = { "domid", "period", "slice", "soft",NULL };
     
-    if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLLhh", kwd_list, 
-                                     &domid, &period, &slice,
-                                     &latency, &extratime, &weight) )
+    if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLi", kwd_list, 
+                                     &domid, &period, &slice, &soft) )
+
         return NULL;
    if ( xc_sedf_domain_set(self->xc_handle, domid, period,
-                           slice, latency, extratime,weight) != 0 )
+                           slice, soft) != 0 )
         return pyxc_error_to_exception(self->xc_handle);
 
     Py_INCREF(zero);
@@ -1491,23 +1491,21 @@ 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,latency;
-    uint16_t weight, extratime;
+    uint64_t period, slice;
+    uint16_t soft;
     
     if(!PyArg_ParseTuple(args, "i", &domid))
         return NULL;
     
     if (xc_sedf_domain_get(self->xc_handle, domid, &period,
-                           &slice,&latency,&extratime,&weight))
+                           &slice, &soft))
         return pyxc_error_to_exception(self->xc_handle);
 
-    return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i,s:i}",
+    return Py_BuildValue("{s:i,s:L,s:L,s:i}",
                          "domid",    domid,
                          "period",    period,
                          "slice",     slice,
-                         "latency",   latency,
-                         "extratime", extratime,
-                         "weight",    weight);
+                         "soft",      soft);
 }
 
 static PyObject *pyxc_shadow_control(PyObject *self,
@@ -2544,8 +2542,7 @@ static PyMethodDef pyxc_methods[] = {
       " dom       [int]:  domain to set\n"
       " period    [long]: domain's scheduling period\n"
       " slice     [long]: domain's slice per period\n"
-      " latency   [long]: domain's wakeup latency hint\n"
-      " extratime [int]:  domain aware of extratime?\n"
+      " soft      [int]:  domain is a soft task?\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
     { "sedf_domain_get",
@@ -2558,8 +2555,7 @@ static PyMethodDef pyxc_methods[] = {
       " domain    [int]: domain ID\n"
       " period    [long]: scheduler period\n"
       " slice     [long]: CPU reservation per period\n"
-      " latency   [long]: domain's wakeup latency hint\n"
-      " extratime [int]:  domain aware of extratime?\n"},
+      " soft      [int]:  domain is a soft task?\n"},
     
     { "sched_credit_domain_set",
       (PyCFunction)pyxc_sched_credit_domain_set,
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 565fa4c..6e143d3 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -331,9 +331,7 @@ struct xen_domctl_scheduler_op {
         struct xen_domctl_sched_sedf {
             uint64_aligned_t period;
             uint64_aligned_t slice;
-            uint64_aligned_t latency;
-            uint32_t extratime;
-            uint32_t weight;
+            uint32_t soft;
         } sedf;
         struct xen_domctl_sched_credit {
             uint16_t weight;
-- 
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®.