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

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



On Thu, 2016-03-17 at 12:06 -0400, Tianyang Chen wrote:
> The current RTDS code has several problems:
>  - the scheduler, although the algorithm is event driven by
>    nature, follows a time driven model (is invoked periodically!),
>    making the code look unnatural;
>  - budget replenishment logic, budget enforcement logic and
> scheduling
>    decisions are mixed and entangled, making the code hard to
> understand;
>  - the various queues of vcpus are scanned various times, making the
>    code inefficient;
> 
> This patch separates budget replenishment and enforcement. It does
> that
> by handling the former with a dedicated timer, and a queue of pending
> replenishment events.
> 
> A replenishment queue has been added to keep track of all vcpus that
> are runnable.
> 
> We also make sure that the main scheduling function is called when a
> scheduling decision is necessary, such as when the currently running
> vcpu runs out of budget.
> 
> Finally, when waking up a vcpu, it is now enough to tickle the
> various
> CPUs appropriately, like all other schedulers also do.
> 
> Signed-off-by: Tianyang Chen <tiche@xxxxxxxxxxxxxx>
> Signed-off-by: Meng Xu <mengxu@xxxxxxxxxxxxx>
> Signed-off-by: Dagaen Golomb <dgolomb@xxxxxxxxxxxxxx>
>
You seem to have taken care of all my remaining comments to v10, so the
patch is:

Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>

(which you could have put there yourself, as I said. :-))

Thanks for all the good work.

If I can already point you to something else that can be improved
further in this scheduler, _completely_ independently from this, and
hence in a fully new patch (series), can you have a look at whether we
really need set_bit(), test_and_clear(), etc, instead of __set_bit(),
__test_and_clear(), etc.?

I'm asking because I'm under the impression that the latter are enough,
and if that is the case, we should go for them, as they're more
efficient.

Thanks again and 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®.