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

2016-03-19 Thread Dario Faggioli
On Wed, 2016-03-16 at 11:43 -0400, Chen, Tianyang wrote: > > On 03/16/2016 10:25 AM, Dario Faggioli wrote: > >  > > This is too detailed for a changelog. If you want this information > > to > > live somewhere (it already lives in the list archives, actually), > > make > > a cover letter (this is

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

2016-03-19 Thread Dario Faggioli
Ok, it's about time that we deal with this changelog! On Mon, 2016-03-14 at 20:04 -0400, Tianyang Chen wrote: > Budget replenishment and enforcement are separated by adding > a replenishment timer, which fires at the next most imminent > release time of all runnable vcpus. > First of all, state

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

2016-03-19 Thread Meng Xu
On Wed, Mar 16, 2016 at 6:23 AM, Dario Faggioli wrote: > On Tue, 2016-03-15 at 23:40 -0400, Meng Xu wrote: >> > > > @@ -115,6 +118,18 @@ >> > > > #define RTDS_delayed_runq_add (1<<__RTDS_delayed_runq_add) >> > > > >> > > > /* >> > > > + * The replenishment timer

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

2016-03-19 Thread Chen, Tianyang
On 03/16/2016 10:25 AM, Dario Faggioli wrote: Ok, it's about time that we deal with this changelog! On Mon, 2016-03-14 at 20:04 -0400, Tianyang Chen wrote: Budget replenishment and enforcement are separated by adding a replenishment timer, which fires at the next most imminent release time

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

2016-03-19 Thread Chen, Tianyang
On 03/16/2016 10:25 AM, Dario Faggioli wrote: +if ( curr_on_cpu(vc->processor) == vc && >+ ( !list_empty(runq) ) ) > So, this is because, since we don't keep the idle vcpus in the runqueues, we need to catch the case where v is running, but no other vcpu is waiting on the

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

2016-03-19 Thread Dario Faggioli
On Wed, 2016-03-16 at 10:20 -0400, Meng Xu wrote: > As to the comment, I will suggest: > > /* >  * RTDS_was_depleted: Is a vcpus budget depleted? > >  * + Set in burn_budget() when a vcpus budget turns to zero > >  * + Checked and cleared in repl_handler() to replenish the budget > >  */ > >

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

2016-03-19 Thread Meng Xu
>> This is too detailed for a changelog. If you want this information to >> live somewhere (it already lives in the list archives, actually), make >> a cover letter (this is just one patch, so it's not required, but >> nothing forbids that). Or put it in a wiki page. Or write a blog post. >> Or

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

2016-03-18 Thread Meng Xu
>> >> sched_rt.c TIMER_SOFTIRQ >> replenishment_timer_handler() >> [spin_lock] >> { >> replenish(i) >> runq_tickle(i) >> }> >> program_timer() >> [spin_lock] >> > And kill this (or, again, move to cover,

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

2016-03-18 Thread Meng Xu
On Wed, Mar 16, 2016 at 10:44 AM, Dario Faggioli wrote: > On Wed, 2016-03-16 at 10:20 -0400, Meng Xu wrote: >> As to the comment, I will suggest: >> >> /* >> * RTDS_was_depleted: Is a vcpus budget depleted? >> >> * + Set in burn_budget() when a vcpus budget turns to

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

2016-03-16 Thread Dario Faggioli
On Tue, 2016-03-15 at 23:40 -0400, Meng Xu wrote: > > > > @@ -115,6 +118,18 @@ > > > >   #define RTDS_delayed_runq_add (1<<__RTDS_delayed_runq_add) > > > > > > > >   /* > > > > + * The replenishment timer handler needs to check this bit > > > > + * to know where a replenished vcpu was, when

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

2016-03-15 Thread Meng Xu
>>> @@ -115,6 +118,18 @@ >>> #define RTDS_delayed_runq_add (1<<__RTDS_delayed_runq_add) >>> >>> /* >>> + * The replenishment timer handler needs to check this bit >>> + * to know where a replenished vcpu was, when deciding which >>> + * vcpu should tickle. >>> + * A replenished vcpu should

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

2016-03-15 Thread Chen, Tianyang
On 03/15/2016 11:11 PM, Meng Xu wrote: + /* * Flags */ @@ -115,6 +118,18 @@ #define RTDS_delayed_runq_add (1<<__RTDS_delayed_runq_add) /* + * The replenishment timer handler needs to check this bit + * to know where a replenished vcpu was, when deciding which + * vcpu should

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

2016-03-15 Thread Meng Xu
On Mon, Mar 14, 2016 at 8:04 PM, Tianyang Chen wrote: > 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

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

2016-03-14 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