Re: [Xen-devel] [PATCH] xen: recalculate per-cpupool credits when updating timeslice

2016-02-02 Thread Dario Faggioli
On Tue, 2016-02-02 at 11:35 +0100, Juergen Gross wrote: > On 02/02/16 10:53, Dario Faggioli wrote: > >  > > In any case, since the lack of locking and lack of recalculation > > look > > like two pretty independent existing bugs to me, can we have > > either: > >  a. two patches; > >  b. one patch b

Re: [Xen-devel] [PATCH] xen: recalculate per-cpupool credits when updating timeslice

2016-02-02 Thread Juergen Gross
On 02/02/16 10:53, Dario Faggioli wrote: > On Fri, 2016-01-29 at 11:59 +0100, Juergen Gross wrote: >> On 29/01/16 11:46, Jan Beulich wrote: >> On 29.01.16 at 11:21, wrote: --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -1086,12 +1086,19 @@ csched_dom_cntl( >>

Re: [Xen-devel] [PATCH] xen: recalculate per-cpupool credits when updating timeslice

2016-02-02 Thread Dario Faggioli
On Fri, 2016-01-29 at 11:59 +0100, Juergen Gross wrote: > On 29/01/16 11:46, Jan Beulich wrote: > > > > > On 29.01.16 at 11:21, wrote: > > > --- a/xen/common/sched_credit.c > > > +++ b/xen/common/sched_credit.c > > > @@ -1086,12 +1086,19 @@ csched_dom_cntl( > > >  static inline void > > >  __csche

Re: [Xen-devel] [PATCH] xen: recalculate per-cpupool credits when updating timeslice

2016-02-01 Thread Alan Robinson
On Fri, Jan 29, 2016 at 11:21:48AM +0100, Juergen Gross wrote: > When modifying the timeslice of the credit scheduler in a cpupool the > cpupool global credit value (n_cpus * credits_per_tslice) isn't > recalculated. This will lead to wrong scheduling decisions later. > > Do the recalculation when

Re: [Xen-devel] [PATCH] xen: recalculate per-cpupool credits when updating timeslice

2016-01-29 Thread Juergen Gross
On 29/01/16 11:46, Jan Beulich wrote: On 29.01.16 at 11:21, wrote: >> --- a/xen/common/sched_credit.c >> +++ b/xen/common/sched_credit.c >> @@ -1086,12 +1086,19 @@ csched_dom_cntl( >> static inline void >> __csched_set_tslice(struct csched_private *prv, unsigned timeslice) >> { >> +uns

Re: [Xen-devel] [PATCH] xen: recalculate per-cpupool credits when updating timeslice

2016-01-29 Thread Jan Beulich
>>> On 29.01.16 at 11:21, wrote: > --- a/xen/common/sched_credit.c > +++ b/xen/common/sched_credit.c > @@ -1086,12 +1086,19 @@ csched_dom_cntl( > static inline void > __csched_set_tslice(struct csched_private *prv, unsigned timeslice) > { > +unsigned long flags; > + > +spin_lock_irqsave

[Xen-devel] [PATCH] xen: recalculate per-cpupool credits when updating timeslice

2016-01-29 Thread Juergen Gross
When modifying the timeslice of the credit scheduler in a cpupool the cpupool global credit value (n_cpus * credits_per_tslice) isn't recalculated. This will lead to wrong scheduling decisions later. Do the recalculation when updating the timeslice. Signed-off-by: Juergen Gross --- xen/common/s