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

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



On Wed, 2016-02-03 at 23:03 -0500, Meng Xu wrote:
> On Wed, Feb 3, 2016 at 7:39 AM, Dario Faggioli
> <dario.faggioli@xxxxxxxxxx> wrote:
>
> > And, at this point, I'm starting thinking again that we want to
> > call
> > runq_tickle() in rt_context_saved(), at least in case
> > __RTDS_delayed_runq_add was set as, if we don't, we're missing
> > tickling
> > for the vcpu being inserted because of that.
> > 
> > Of course, all the above, taken with a little bit of salt... i.e.,
> > I do
> > not expect to have got all the details right, especially in the
> > code,
> > but it should at least be effective in showing the idea.
> > 
> > Thoughts?
> 
> 
> This is smart and we should be able to put it into this patch series.
> 
It's in the code already...

> When a VCPU is stopped on a core, hasn't saved its context and has
> not
> been added back to runq/depletedq, we should delay the tickle until
> its context has been saved and it has been put back to the
> (runq/depletedq) queue.
>
...It's only this bit (the tickling) that we need to get right. :-)

> > Also, under what conditions we need, as soon as replenishment for
> > vcpu
> > X happened, to queue another replenishment for the same vcpu, at
> > its
> > next deadline? Always, I would say (unless the vcpu is sleeping,
> > because of the optimization you introduced)?
> 
> 
> 
> I'm thinking the following example as to why we need to rearm the
> timer for the just-replenished VCPU (Although it's very likely I
> missed something.):
> 
> A runnable VCPU (period = 10ms, budget = 4ms) is scheduled to run on
> a
> core at t = 0;
> at t = 4, its budget depleted and it's added to depletedq;
> at t=10, the replenish timer should fire and replenish the budget;
> I think we should arm the replenish timer for t = 20 so that its
> budget will get replenished at t = 20 for the period [20, 30];
> If we don't arm the timer at t = 20, how will the VCPU's budget be
> replenished at t=20?
> 
> Please correct me if I'm wrong.
> 
No, I think you're right. It was me that, during the first one or two
emails, was probably thinking with my CBS mindset! :-/

Now I see that we indeed need to have a replenishment event pretty much
always running for every (runnable) vcpu, and that's also what I'm
saying when replying to Tianyang in the other email...

Let's see if we can sort the terminology and spurious wakeup quirks,
and check in this code!! :-P

Regards,
Dario
--Â
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

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