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

Re: [Xen-devel] [PATCH RFC v1 4/4] libxc for rt scheduler



On Thu, 2014-07-17 at 18:16 -0400, Meng Xu wrote:
> Hi Ian and George,
> 
> George Dunlap <George.Dunlap@xxxxxxxxxxxxx>ä2014å7æ17æææååéï
>         On Thu, Jul 17, 2014 at 4:29 PM, Ian Campbell
>         <Ian.Campbell@xxxxxxxxxx> wrote:
>         > On Fri, 2014-07-11 at 16:49 +0200, Dario Faggioli wrote:
>         >
>         >> So, the bouncing logic seems fine. Looking at what other
>         schedulers do,
>         >> there should be no particular need for bouncing anything.
>         >
>         > Seems like there is some confusing precedent around the use
>         of sysctl vs
>         > domctl for sched parameters here.
>         >
>         > Most schedulers use domctl but arinc uses sysctl.
>         
>         They're controlling different things.
>         
>         domctl is controlling parameters related to *a particular
>         domain* (for
>         instance, weight or cap); sysctl is relating to setting
>         parameters
>         *for the scheduler as a whole* (for example, timeslice).
>         
>  
> Do we have to use inline parameters in domctl?  
> 
> 
> Right now, we used the domctl to set/get the parameters of each vcpu
> of a domain. So from what the functionality does, it should be in
> domctl.  If we don't have to use inline parameters, I would prefer to
> use domctl. :-)

The important thing is that the array of per-VCPU parameters needs to be
a GUEST_HANDLE and not a statically sized array with some arbitrary
size.

AFAICT that means that the xen_domctl_shceduler_op change should be:
+/*
+ * This structure is used to pass to rt scheduler from a 
+ * privileged domain to Xen
+ */
+struct xen_domctl_sched_rt_vcpus_params {
+    signed long period; /* s_time_t type */
+    signed long budget; 
+};
+typedef struct xen_domctl_sched_rt...
+DEFINE_XEN_GUE....

@@ -367,6 +383,9 @@ struct xen_domctl_scheduler_op {
         struct xen_domctl_sched_credit2 {
             uint16_t weight;
         } credit2;
+        struct xen_domctl_sched_rt {
+            type some_per_domain_parameter;
+            uint16_t nr_vcpus;
+            uint16_t vcpu_index;
+            XEN_GUEST_HANDLE_64(xen_domctl_sched_rt_vcpu_params_t) vcpu;
+        } rt;
     } u;

Currently you don't appear to have any per_domain_parameters, but I have
included one as an illustration.

Ian.



_______________________________________________
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®.