Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
On Mon, Mar 14, 2016 at 12:35 PM, Dario Faggioli wrote: > On Mon, 2016-03-14 at 12:03 -0400, Meng Xu wrote: >> On Mon, Mar 14, 2016 at 11:38 AM, Meng Xu >> wrote: >> > >> > I'm ok that we keep using spin_lock_irqsave() for now. But maybe >> >

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
> >> So IMHO, the replenishment handler will be called in interrupt >> handler >> *and* with interrupt enabled. >> The only difference between lock_irq() and lock_irqsave() is that >> lock_irq() can only be called with interrupt enabled. (lock_irq will >> check if the interrupt is enabled before

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Dario Faggioli
On Mon, 2016-03-14 at 12:03 -0400, Meng Xu wrote: > On Mon, Mar 14, 2016 at 11:38 AM, Meng Xu > wrote: > >  > > I'm ok that we keep using spin_lock_irqsave() for now. But maybe > > later, it will be a better idea to explore if spin_lock_irq() can > > replace all

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Dario Faggioli
On Mon, 2016-03-14 at 11:38 -0400, Meng Xu wrote: > Hi Dario, > Hi, > On Mon, Mar 14, 2016 at 7:58 AM, Dario Faggioli > wrote: > > I recommend looking at what happens inside init_timer(), i.e., > > where a > > pointer to this function is stashed. Then, still in > >

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
On Mon, Mar 14, 2016 at 11:38 AM, Meng Xu wrote: > Hi Dario, > > On Mon, Mar 14, 2016 at 7:58 AM, Dario Faggioli > wrote: >> On Fri, 2016-03-11 at 23:54 -0500, Meng Xu wrote: >>> >>> > @@ -1150,6 +1300,101 @@ rt_dom_cntl( >>> > return rc; >>>

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
Hi Dario, On Mon, Mar 14, 2016 at 7:58 AM, Dario Faggioli wrote: > On Fri, 2016-03-11 at 23:54 -0500, Meng Xu wrote: >> >> > @@ -1150,6 +1300,101 @@ rt_dom_cntl( >> > return rc; >> > } >> > >> > +/* >> > + * The replenishment timer handler picks vcpus >> > + *

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
On Mon, Mar 14, 2016 at 7:48 AM, Dario Faggioli wrote: > On Sun, 2016-03-13 at 11:43 -0400, Meng Xu wrote: >> On Sat, Mar 12, 2016 at 5:21 PM, Chen, Tianyang > > wrote: >> > On 03/11/2016 11:54 PM, Meng Xu wrote: >> > > One more thing we should

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Dario Faggioli
On Fri, 2016-03-11 at 23:54 -0500, Meng Xu wrote: >  > > @@ -1150,6 +1300,101 @@ rt_dom_cntl( > >  return rc; > >  } > > > > +/* > > + * The replenishment timer handler picks vcpus > > + * from the replq and does the actual replenishment. > > + */ > > +static void repl_handler(void *data){ >

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Dario Faggioli
On Sun, 2016-03-13 at 11:43 -0400, Meng Xu wrote: > On Sat, Mar 12, 2016 at 5:21 PM, Chen, Tianyang > wrote: > > On 03/11/2016 11:54 PM, Meng Xu wrote: > > > One more thing we should think about is: > > > How can we "prove/test" the correctness of the scheduler? > > > Can

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-13 Thread Meng Xu
On Sat, Mar 12, 2016 at 5:21 PM, Chen, Tianyang wrote: > > > On 03/11/2016 11:54 PM, Meng Xu wrote: >> >> I'm focusing on the style and the logic in the replenish handler: >> >>> /* >>> @@ -160,6 +180,7 @@ struct rt_private { >>>*/ >>> struct rt_vcpu { >>>

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-12 Thread Chen, Tianyang
On 03/12/2016 05:36 PM, Andrew Cooper wrote: On 12/03/2016 22:21, Chen, Tianyang wrote: On 03/11/2016 11:54 PM, Meng Xu wrote: I'm focusing on the style and the logic in the replenish handler: /* @@ -160,6 +180,7 @@ struct rt_private { */ struct rt_vcpu { struct

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-12 Thread Andrew Cooper
On 12/03/2016 22:21, Chen, Tianyang wrote: > > > On 03/11/2016 11:54 PM, Meng Xu wrote: >> I'm focusing on the style and the logic in the replenish handler: >> >>> /* >>> @@ -160,6 +180,7 @@ struct rt_private { >>>*/ >>> struct rt_vcpu { >>> struct list_head q_elem;/* on the

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-12 Thread Chen, Tianyang
On 03/11/2016 11:54 PM, Meng Xu wrote: I'm focusing on the style and the logic in the replenish handler: /* @@ -160,6 +180,7 @@ struct rt_private { */ struct rt_vcpu { struct list_head q_elem;/* on the runq/depletedq list */ +struct list_head replq_elem;/* on the repl

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-11 Thread Meng Xu
I'm focusing on the style and the logic in the replenish handler: > /* > @@ -160,6 +180,7 @@ struct rt_private { > */ > struct rt_vcpu { > struct list_head q_elem;/* on the runq/depletedq list */ > +struct list_head replq_elem;/* on the repl event list */ missing space before /*

[Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-11 Thread Tianyang Chen
Budget replenishment and enforcement are separated by adding a replenishment timer, which fires at the next most imminent release time of all runnable vcpus. A replenishment queue has been added to keep track of all vcpus that are runnable. The following functions have major changes to manage