Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-17 Thread Vincent Guittot
On 17 September 2014 15:25, Peter Zijlstra wrote: > On Tue, Sep 16, 2014 at 12:14:54AM +0200, Vincent Guittot wrote: >> On 15 September 2014 13:42, Peter Zijlstra wrote: > >> > OK, I've reconsidered _again_, I still don't get it. >> > >> > So fundamentally I think its wrong to scale with the capa

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-17 Thread Peter Zijlstra
On Wed, Sep 17, 2014 at 07:45:27PM +0100, Morten Rasmussen wrote: > Right. You don't need to scale capacity to determine whether a cpu is > full or not if you don't have DVFS, but I don't think it hurts if it is > done right. We need the scaling to figure out how much capacity is > available. Mayb

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-17 Thread Peter Zijlstra
On Tue, Sep 16, 2014 at 12:14:54AM +0200, Vincent Guittot wrote: > On 15 September 2014 13:42, Peter Zijlstra wrote: > > OK, I've reconsidered _again_, I still don't get it. > > > > So fundamentally I think its wrong to scale with the capacity; it just > > doesn't make any sense. Consider big.lit

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-17 Thread Morten Rasmussen
On Wed, Sep 17, 2014 at 07:45:27PM +0100, Morten Rasmussen wrote: > On Mon, Sep 15, 2014 at 09:01:59PM +0100, Peter Zijlstra wrote: > > On Mon, Sep 15, 2014 at 03:07:44PM -0400, Nicolas Pitre wrote: > > > On Mon, 15 Sep 2014, Peter Zijlstra wrote: > > > > > Let's suppose a task running on a 1GHz C

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-17 Thread Morten Rasmussen
On Mon, Sep 15, 2014 at 09:01:59PM +0100, Peter Zijlstra wrote: > On Mon, Sep 15, 2014 at 03:07:44PM -0400, Nicolas Pitre wrote: > > On Mon, 15 Sep 2014, Peter Zijlstra wrote: > > > Let's suppose a task running on a 1GHz CPU producing a load of 100. > > > > The same task on a 100MHz CPU would pro

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-16 Thread Dietmar Eggemann
On 14/09/14 12:41, Peter Zijlstra wrote: On Thu, Sep 11, 2014 at 07:26:48PM +0200, Vincent Guittot wrote: On 11 September 2014 18:15, Peter Zijlstra wrote: On Tue, Aug 26, 2014 at 01:06:54PM +0200, Vincent Guittot wrote: +static inline int group_has_free_capacity(struct sg_lb_stats *sgs, +

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-15 Thread Peter Zijlstra
On Mon, Sep 15, 2014 at 03:07:44PM -0400, Nicolas Pitre wrote: > On Mon, 15 Sep 2014, Peter Zijlstra wrote: > Let's suppose a task running on a 1GHz CPU producing a load of 100. > > The same task on a 100MHz CPU would produce a load of 1000 because that > CPU is 10x slower. So to properly evalu

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-15 Thread Vincent Guittot
On 16 September 2014 00:14, Vincent Guittot wrote: > On 15 September 2014 13:42, Peter Zijlstra wrote: >> On Sun, Sep 14, 2014 at 09:41:56PM +0200, Peter Zijlstra wrote: >>> On Thu, Sep 11, 2014 at 07:26:48PM +0200, Vincent Guittot wrote: >>> > On 11 September 2014 18:15, Peter Zijlstra wrote: >

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-15 Thread Vincent Guittot
On 15 September 2014 13:42, Peter Zijlstra wrote: > On Sun, Sep 14, 2014 at 09:41:56PM +0200, Peter Zijlstra wrote: >> On Thu, Sep 11, 2014 at 07:26:48PM +0200, Vincent Guittot wrote: >> > On 11 September 2014 18:15, Peter Zijlstra wrote: > >> > > I'm confused about the utilization vs capacity_or

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-15 Thread Nicolas Pitre
On Mon, 15 Sep 2014, Peter Zijlstra wrote: > On Sun, Sep 14, 2014 at 09:41:56PM +0200, Peter Zijlstra wrote: > > On Thu, Sep 11, 2014 at 07:26:48PM +0200, Vincent Guittot wrote: > > > On 11 September 2014 18:15, Peter Zijlstra wrote: > > > > > I'm confused about the utilization vs capacity_orig.

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-15 Thread Peter Zijlstra
On Sun, Sep 14, 2014 at 09:41:56PM +0200, Peter Zijlstra wrote: > On Thu, Sep 11, 2014 at 07:26:48PM +0200, Vincent Guittot wrote: > > On 11 September 2014 18:15, Peter Zijlstra wrote: > > > I'm confused about the utilization vs capacity_orig. I see how we should > > > > 1st point is that I shou

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-14 Thread Peter Zijlstra
On Sun, Sep 14, 2014 at 09:41:56PM +0200, Peter Zijlstra wrote: > On Thu, Sep 11, 2014 at 07:26:48PM +0200, Vincent Guittot wrote: > > On 11 September 2014 18:15, Peter Zijlstra wrote: > > > On Tue, Aug 26, 2014 at 01:06:54PM +0200, Vincent Guittot wrote: > > >> +static inline int group_has_free_c

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-14 Thread Peter Zijlstra
On Thu, Sep 11, 2014 at 07:26:48PM +0200, Vincent Guittot wrote: > On 11 September 2014 18:15, Peter Zijlstra wrote: > > On Tue, Aug 26, 2014 at 01:06:54PM +0200, Vincent Guittot wrote: > >> +static inline int group_has_free_capacity(struct sg_lb_stats *sgs, > >> + struct lb_en

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-11 Thread Vincent Guittot
On 11 September 2014 18:15, Peter Zijlstra wrote: > On Tue, Aug 26, 2014 at 01:06:54PM +0200, Vincent Guittot wrote: >> +static inline int group_has_free_capacity(struct sg_lb_stats *sgs, >> + struct lb_env *env) >> { >> + if ((sgs->group_capacity_orig * 100) > >> +

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-11 Thread Peter Zijlstra
On Tue, Aug 26, 2014 at 01:06:54PM +0200, Vincent Guittot wrote: > +static inline int group_has_free_capacity(struct sg_lb_stats *sgs, > + struct lb_env *env) > { > + if ((sgs->group_capacity_orig * 100) > > + (sgs->group_utilization * env->sd->imbalance

Re: [PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-09-11 Thread Peter Zijlstra
On Tue, Aug 26, 2014 at 01:06:54PM +0200, Vincent Guittot wrote: > The scheduler tries to compute how many tasks a group of CPUs can handle by > assuming that a task's load is SCHED_LOAD_SCALE and a CPU capacity is > SCHED_CAPACITY_SCALE. > We can now have a better idea of the capacity of a group o

[PATCH v5 11/12] sched: replace capacity_factor by utilization

2014-08-26 Thread Vincent Guittot
The scheduler tries to compute how many tasks a group of CPUs can handle by assuming that a task's load is SCHED_LOAD_SCALE and a CPU capacity is SCHED_CAPACITY_SCALE. We can now have a better idea of the capacity of a group of CPUs and of the utilization of this group thanks to the rework of group