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

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



Hi Ian,

Ian Campbell <Ian.Campbell@xxxxxxxxxx>ä2014å7æ18æææäåéï
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.


Thank you so much for your detailed explanation! This is exactly what I'm doing right now. :-) It will be in the next version of the patch. :-)

Best,

Meng

Â


--


-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania

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