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

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



On Thu, 2016-03-10 at 13:08 -0500, Meng Xu wrote:
> On Thu, Mar 10, 2016 at 11:43 AM, Dario Faggioli
> <dario.faggioli@xxxxxxxxxx> wrote:
>
> I think the pseudo-code makes sense. I just need to add some more
> logic into it to make it complete. It forgets to handle the runq.
> 
You mean...
> > 
> > 
> >   ...
> >   LIST_HEAD(tmp_replq);
> > 
> >   list_for_each_safe(iter, tmp, replq)
> >   {
> >       svc = replq_elem(iter);
> > 
> >       if ( now < svc->cur_deadline )
> >           break;
> > 
> >       list_del(&svc->replq_elem);
> >       rt_update_deadline(now, svc);
> >       list_add(&svc->replq_elem, &tmp_replq);
>          /* if svc is on runq, we need to put it to the correct place
> since its deadline changes. */
>           if( __vcpu_on_q(svc) )
>           {
>               /* put back to runq */
>              __q_remove(svc);
>              __runq_insert(ops, svc);
> 
...This?

Well, sure, this was being done in repl_handler() in Tianyang's v7
already, and I never meant to say we shouldn't do that any longer.

I actually did not include it in here, because it was obvious to me
that it still was necessary, and it was probably ok to put it in either
of the loops (while I wanted to highlight what we need to do in the
first and what in the second).

> > It may look a bit convoluted, all these list moving, but I do like
> > the
> > fact that is is super self-contained.
> > 
> > How does that sound / What did I forget this time ? :-)
> Besides we need to "resort" the runq if the to-be-replenished vcpu is
> on the runq now. Besides that, I think it's good.
> 
If by re-sorting you mean what you added above, sure thing.

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