[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [RFC v2 1/4] xen: add real time scheduler rt
- To: Jan Beulich <JBeulich@xxxxxxxx>
- From: Meng Xu <xumengpanda@xxxxxxxxx>
- Date: Wed, 30 Jul 2014 11:55:57 -0400
- Cc: "ian.campbell@xxxxxxxxxx" <ian.campbell@xxxxxxxxxx>, "xisisu@xxxxxxxxx" <xisisu@xxxxxxxxx>, "stefano.stabellini@xxxxxxxxxxxxx" <stefano.stabellini@xxxxxxxxxxxxx>, "george.dunlap@xxxxxxxxxxxxx" <george.dunlap@xxxxxxxxxxxxx>, "ian.jackson@xxxxxxxxxxxxx" <ian.jackson@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>, Meng Xu <mengxu@xxxxxxxxxxxxx>, "lichong659@xxxxxxxxx" <lichong659@xxxxxxxxx>, "dgolomb@xxxxxxxxxxxxxx" <dgolomb@xxxxxxxxxxxxxx>
- Delivery-date: Wed, 30 Jul 2014 15:56:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
Hi Jan,Jan Beulich < JBeulich@xxxxxxxx>ä2014å7æ29æææäåéï >>> On 29.07.14 at 03:52, <mengxu@xxxxxxxxxxxxx> wrote:
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -68,6 +68,7 @@ static const struct scheduler *schedulers[] = {
> Â Â Â&sched_sedf_def,
> Â Â Â&sched_credit_def,
> Â Â Â&sched_credit2_def,
> + Â Â&sched_rt_def,
> Â Â Â&sched_arinc653_def,
> Â};
Is the insertion as other than last item (as one would expect for a
new addition) intentional? Not that I think this matters much, but
I'm still curious.
It's not intentional. I can put it to the last item. Â
> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -339,6 +339,18 @@ struct xen_domctl_max_vcpus {
> Âtypedef struct xen_domctl_max_vcpus xen_domctl_max_vcpus_t;
> ÂDEFINE_XEN_GUEST_HANDLE(xen_domctl_max_vcpus_t);
>
> +/*
> + * This structure is used to pass to rt scheduler from a
> + * privileged domain to Xen
> + */
> +struct xen_domctl_sched_rt_params {
> + Â Â/* get vcpus' info */
> + Â Âint64_t period; /* s_time_t type */
> + Â Âint64_t budget;
> +  Âint   index;
Are all these really meaningfully signed quantities?
Dario explained this. I will change it to unsigned 64 bits. We need signed value inside Xen, but not the tool stack.
Â
Also, you need to pad the structure to a multiple of 8 bytes, or
its layout will differ between 32- and 64-bit (tool stack) callers.
> @@ -367,6 +382,15 @@ struct xen_domctl_scheduler_op {
> Â Â Â Â Âstruct xen_domctl_sched_credit2 {
> Â Â Â Â Â Â Âuint16_t weight;
> Â Â Â Â Â} credit2;
> + Â Â Â Âstruct xen_domctl_sched_rt{
> + Â Â Â Â Â Â/* get vcpus' params */
> + Â Â Â Â Â ÂXEN_GUEST_HANDLE_64(xen_domctl_sched_rt_params_t) vcpu;
> + Â Â Â Â Â Âuint16_t nr_vcpus;
> + Â Â Â Â Â Â/* set one vcpu's params */
> + Â Â Â Â Â Âuint16_t vcpu_index;
> + Â Â Â Â Â Âint64_t period;
> + Â Â Â Â Â Âint64_t budget;
> + Â Â Â Â} rt;
Mostly the same comments here, just that the padding here needs to
go in the middle.
Roger. Will pad it. ÂThank you very much for your comments and suggestions!
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
|