Re: [PATCH v3 2/3] sched/fair: use util_est in LB and WU paths

2018-01-31 Thread Patrick Bellasi
On 25-Jan 20:03, Pavan Kondeti wrote: > On Wed, Jan 24, 2018 at 07:31:38PM +, Patrick Bellasi wrote: > > > > > > + /* > > > > +* These are the main cases covered: > > > > +* - if *p is the only task sleeping on this CPU, then: > > > > +* cpu_util (== task_uti

Re: [PATCH v3 2/3] sched/fair: use util_est in LB and WU paths

2018-01-25 Thread Pavan Kondeti
On Wed, Jan 24, 2018 at 07:31:38PM +, Patrick Bellasi wrote: > > > > + /* > > > +* These are the main cases covered: > > > +* - if *p is the only task sleeping on this CPU, then: > > > +* cpu_util (== task_util) > util_est (== 0) > > > +* and thus w

Re: [PATCH v3 2/3] sched/fair: use util_est in LB and WU paths

2018-01-24 Thread Patrick Bellasi
On 24-Jan 17:03, Pavan Kondeti wrote: > Hi Patrick, Hi Pavan, > On Tue, Jan 23, 2018 at 06:08:46PM +, Patrick Bellasi wrote: > > static unsigned long cpu_util_wake(int cpu, struct task_struct *p) > > { > > - unsigned long util, capacity; > > + long util, util_est; > > > > /* Task

Re: [PATCH v3 2/3] sched/fair: use util_est in LB and WU paths

2018-01-24 Thread Pavan Kondeti
Hi Patrick, On Tue, Jan 23, 2018 at 06:08:46PM +, Patrick Bellasi wrote: > static unsigned long cpu_util_wake(int cpu, struct task_struct *p) > { > - unsigned long util, capacity; > + long util, util_est; > > /* Task has no contribution or is new */ > if (cpu != task_cp

[PATCH v3 2/3] sched/fair: use util_est in LB and WU paths

2018-01-23 Thread Patrick Bellasi
When the scheduler looks at the CPU utilization, the current PELT value for a CPU is returned straight away. In certain scenarios this can have undesired side effects on task placement. For example, since the task utilization is decayed at wakeup time, when a long sleeping big task is enqueued it