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

2017-07-25 Thread Dario Faggioli
On Tue, 2017-07-25 at 15:34 +0100, George Dunlap wrote: > On 06/29/2017 11:09 AM, Dario Faggioli wrote: > > E.g., if the vcpu is "greedy", and always tries to run, as soon as > > it > > has some budget, the difference between the two solution is _where_ > > we > > put the "sitting period". > > Sor

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

2017-07-25 Thread Dario Faggioli
On Tue, 2017-07-25 at 16:08 +0100, George Dunlap wrote: > On 06/08/2017 01:08 PM, Dario Faggioli wrote: > > > Hmm, this needs to be rebased on the structure layout patches I > checked > in last week. :-) > Indeed it does. And of course, I'm up for it. :-) The soft-affinity series is likely to ge

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

2017-07-25 Thread George Dunlap
On 06/08/2017 01:08 PM, Dario Faggioli wrote: > This commit implements the Xen part of the cap mechanism for > Credit2. > > A cap is how much, in terms of % of physical CPU time, a domain > can execute at most. > > For instance, a domain that must not use more than 1/4 of one > physical CPU, must

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

2017-07-25 Thread George Dunlap
On 06/29/2017 11:09 AM, Dario Faggioli wrote: > On Wed, 2017-06-28 at 20:05 +0100, George Dunlap wrote: >> On Wed, Jun 28, 2017 at 3:56 PM, Dario Faggioli >> wrote: >>> >>> In the case you describe, at 2T, with budget -C, the first round of >>> the >>> loop will make the budget 0, and set the next

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

2017-06-29 Thread Dario Faggioli
On Wed, 2017-06-28 at 20:05 +0100, George Dunlap wrote: > On Wed, Jun 28, 2017 at 3:56 PM, Dario Faggioli > wrote: > > > > In the case you describe, at 2T, with budget -C, the first round of > > the > > loop will make the budget 0, and set the next replenishment to 3T. > > As > > you say, since b

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

2017-06-28 Thread George Dunlap
On Wed, Jun 28, 2017 at 3:56 PM, Dario Faggioli wrote: > On Wed, 2017-06-28 at 15:28 +0100, George Dunlap wrote: >> On Fri, Jun 23, 2017 at 5:19 PM, Dario Faggioli >> wrote: >> > > > +{ >> > > > +struct csched2_dom *sdom = data; >> > > > +unsigned long flags; >> > > > +s_time_t now; >

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

2017-06-28 Thread Dario Faggioli
On Wed, 2017-06-28 at 15:28 +0100, George Dunlap wrote: > On Fri, Jun 23, 2017 at 5:19 PM, Dario Faggioli > wrote: > > > > +{ > > > > +struct csched2_dom *sdom = data; > > > > +unsigned long flags; > > > > +s_time_t now; > > > > +LIST_HEAD(parked); > > > > + > > > > +spin_lock_

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

2017-06-28 Thread George Dunlap
On Fri, Jun 23, 2017 at 5:19 PM, Dario Faggioli wrote: >> > +{ >> > +struct csched2_dom *sdom = data; >> > +unsigned long flags; >> > +s_time_t now; >> > +LIST_HEAD(parked); >> > + >> > +spin_lock_irqsave(&sdom->budget_lock, flags); >> > + >> > +/* >> > + * It is possib

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

2017-06-23 Thread Dario Faggioli
On Thu, 2017-06-22 at 17:55 +0100, George Dunlap wrote: > On 08/06/17 13:08, Dario Faggioli wrote: > > This commit implements the Xen part of the cap mechanism for > > Credit2. > > > > A cap is how much, in terms of % of physical CPU time, a domain > > can execute at most. > > > > For instance, a

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

2017-06-22 Thread George Dunlap
On 08/06/17 13:08, Dario Faggioli wrote: > This commit implements the Xen part of the cap mechanism for > Credit2. > > A cap is how much, in terms of % of physical CPU time, a domain > can execute at most. > > For instance, a domain that must not use more than 1/4 of one > physical CPU, must have

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

2017-06-15 Thread Anshul Makkar
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

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

2017-06-13 Thread Dario Faggioli
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 @@ > > > >   */ > > > > > > > >  /* > > > > + * Utilization cap: > > > > + * > > > > + * Setting an pCPU utilization cap for a domain means the > > > > following: > > > > +

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

2017-06-13 Thread Anshul Makkar
On 12/06/2017 14:19, Dario Faggioli wrote: Hey, Budget is burned by the domain's vCPUs, in a similar way to how credits are. When a domain runs out of budget, its vCPUs can't run any longer. if the vcpus of a domain have credit and if budget has run out, will the vcpus won't be scheduled.

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

2017-06-12 Thread Dario Faggioli
Hey, Thanks for looking at the patch! :-) On Mon, 2017-06-12 at 12:16 +0100, Anshul Makkar wrote: > On 08/06/2017 13:08, Dario Faggioli wrote: > > This commit implements the Xen part of the cap mechanism for > > Credit2. > > > > A cap is how much, in terms of % of physical CPU time, a domain > >

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

2017-06-12 Thread Anshul Makkar
On 08/06/2017 13:08, Dario Faggioli wrote: This commit implements the Xen part of the cap mechanism for Credit2. A cap is how much, in terms of % of physical CPU time, a domain can execute at most. For instance, a domain that must not use more than 1/4 of one physical CPU, must have a cap of 25

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

2017-06-08 Thread Dario Faggioli
This commit implements the Xen part of the cap mechanism for Credit2. A cap is how much, in terms of % of physical CPU time, a domain can execute at most. For instance, a domain that must not use more than 1/4 of one physical CPU, must have a cap of 25%; one that must not use more than 1+1/2 of p