From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH v2 1/4] xen: add real time scheduler rt Date: Mon, 8 Sep 2014 15:32:49 +0100 Message-ID: <540DBE11.4030500@eu.citrix.com> References: <1410118861-2671-1-git-send-email-mengxu@cis.upenn.edu> <1410118861-2671-2-git-send-email-mengxu@cis.upenn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1410118861-2671-2-git-send-email-mengxu@cis.upenn.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Meng Xu , xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, xisisu@gmail.com, stefano.stabellini@eu.citrix.com, lu@cse.wustl.edu, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, ptxlinh@gmail.com, xumengpanda@gmail.com, JBeulich@suse.com, chaowang@wustl.edu, lichong659@gmail.com, dgolomb@seas.upenn.edu List-Id: xen-devel@lists.xenproject.org Interface comments on the first pass; I'll dig into the algorithm more on the second pass. On 09/07/2014 08:40 PM, Meng Xu wrote: > diff --git a/xen/common/schedule.c b/xen/common/schedule.c > index 73cc2ea..dc4f749 100644 > --- a/xen/common/schedule.c > +++ b/xen/common/schedule.c > @@ -69,6 +69,7 @@ static const struct scheduler *schedulers[] = { > &sched_credit_def, > &sched_credit2_def, > &sched_arinc653_def, > + &sched_rt_ds_def, I think it would be nicer to leave the _ out of the middle -- just call this the "rtds" server (here and elsewhere). > }; > > static struct scheduler __read_mostly ops; > diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h > index 69a8b44..11654d0 100644 > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -347,6 +347,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_vcpus_t); > #define XEN_SCHEDULER_CREDIT 5 > #define XEN_SCHEDULER_CREDIT2 6 > #define XEN_SCHEDULER_ARINC653 7 > +#define XEN_SCHEDULER_RT_DS 8 > + > /* Set or get info? */ > #define XEN_DOMCTL_SCHEDOP_putinfo 0 > #define XEN_DOMCTL_SCHEDOP_getinfo 1 > @@ -368,6 +370,10 @@ struct xen_domctl_scheduler_op { > struct xen_domctl_sched_credit2 { > uint16_t weight; > } credit2; > + struct xen_domctl_sched_rt{ > + uint32_t period; > + uint32_t budget; > + } rt; I'm not sure if you meant to leave this as "rt" instead of "rtds", but I don't think we can assume that every other server is going to expose "period" and "budget": the sEDF scheduler had "slice" instead, for instance. I would prefer this to be "xen_domctl_sched_rtds". > } u; > }; > typedef struct xen_domctl_scheduler_op xen_domctl_scheduler_op_t; > diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h > index cfcf4aa..87340c4 100644 > --- a/xen/include/public/trace.h > +++ b/xen/include/public/trace.h > @@ -77,6 +77,7 @@ > #define TRC_SCHED_CSCHED2 1 > #define TRC_SCHED_SEDF 2 > #define TRC_SCHED_ARINC653 3 > +#define TRC_SCHED_RT 4 TRC_SCHED_RTDS -George