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

Re: [Xen-devel] [PATCH 1/4] xen: credit2: implement utilization cap



On 13/06/2017 22:13, Dario Faggioli wrote:
On Tue, 2017-06-13 at 17:07 +0100, Anshul Makkar wrote:
On 12/06/2017 14:19, Dario Faggioli wrote:
@@ -92,6 +92,82 @@
  */

what I want to ask is that if the budget of the domain is
replenished,
but credit for the vcpus of that domain is not available, then what
happens.

Yes, but the point is that budget can be available or not, while
credits are always available. There's no such thing as credit not being
available at all.

The amount of credits each vcpu has decides which vcpu will run, in the
sense that it will be the one that has the highest amount of credits.
The others will indeed wait, but because they've got less credit than
the one that runs, not because they don't have credits available.

Ok, as discussed, credits are resetted if it reaches 0. In that sense its being considered "always available"..

I believe, vcpus won't be scheduled (even if they have budget_quota)
till they get their credit replenished.

Credits are not exhausted or replenished.

But... it's already totally dynamic.

csched2_dom_cntl()
{
svc->budget_quota = max(sdom->tot_budget / sdom->nr_vcpus,
                                         CSCHED2_MIN_TIMER);
}
If domain->tot_budge = 200
nr_cpus is 4, then each cpu gets 50%.
How this is dynamic allocation ? We are not considering vcpu
utilization
of other vcpus of domain before allocating budget_quota for some
vcpu.

Right. Well, what this means is that each vcpu will get budget in
chunks of tot_budget/nr_vcpus. But then, how much budget each vcpu will
actually be able to get and consume in each period, it's impossible to
know in advance, as it will depend on overall system load, and the
behavior of the various vcpus of the domain.
Yeah, the current implementation is dynamic in the sense that vcpu can execute in total more than its quota across multiple budget cycles, but its static in the sense that vcpu can't execute more than its budget quota in a single budget cycle.s

In runq candidate we have a code base

Regards,
Dario

Reviewed-by: Anshul Makkar<anshul.makkar@xxxxxxxxxx>
Anshul


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.