Re: PELT initial task load and wake_up_new_task()

2015-12-17 Thread Yuyang Du
On Thu, Dec 17, 2015 at 10:43:03AM +0100, Peter Zijlstra wrote: > On Thu, Dec 17, 2015 at 07:34:27AM +0800, Yuyang Du wrote: > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index e3266eb..3f6a8b3 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -2908,10 +2908

Re: PELT initial task load and wake_up_new_task()

2015-12-17 Thread Peter Zijlstra
On Thu, Dec 17, 2015 at 07:34:27AM +0800, Yuyang Du wrote: > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index e3266eb..3f6a8b3 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -2908,10 +2908,18 @@ void remove_entity_load_avg(struct sched_entity *se) > { > str

Re: PELT initial task load and wake_up_new_task()

2015-12-16 Thread Yuyang Du
Hi Steve, On Wed, Dec 16, 2015 at 06:50:43PM -0800, Steve Muckle wrote: > On 12/15/2015 03:55 PM, Yuyang Du wrote: > > Hope the following patch should work. > > Thanks Yuyang. AFAICS it should work, though I believe the test on > last_update_time could instead go at the top of migrate_task_rq_fai

Re: PELT initial task load and wake_up_new_task()

2015-12-16 Thread Steve Muckle
On 12/15/2015 03:55 PM, Yuyang Du wrote: > Hope the following patch should work. Thanks Yuyang. AFAICS it should work, though I believe the test on last_update_time could instead go at the top of migrate_task_rq_fair()? It'd save the fn call to remove_entity_load_avg() and two unnecessary assignme

Re: PELT initial task load and wake_up_new_task()

2015-12-15 Thread Yuyang Du
On Tue, Dec 15, 2015 at 10:45:53AM -0800, Steve Muckle wrote: > On 12/14/2015 06:24 PM, Yuyang Du wrote: > >>> On Fri, Dec 11, 2015 at 06:01:45PM -0800, Steve Muckle wrote: > In init_entity_runnable_average() the last_update_time is initialized to > zero. The task is given max load and ut

Re: PELT initial task load and wake_up_new_task()

2015-12-15 Thread Steve Muckle
On 12/14/2015 06:24 PM, Yuyang Du wrote: >>> On Fri, Dec 11, 2015 at 06:01:45PM -0800, Steve Muckle wrote: In init_entity_runnable_average() the last_update_time is initialized to zero. The task is given max load and utilization as a pessimistic initial estimate. But if in

Re: PELT initial task load and wake_up_new_task()

2015-12-15 Thread Yuyang Du
On Mon, Dec 14, 2015 at 04:41:14PM -0800, Steve Muckle wrote: > Hi Yuyang, > > On 12/13/2015 11:13 AM, Yuyang Du wrote: > > Hi Steve, > > > > On Fri, Dec 11, 2015 at 06:01:45PM -0800, Steve Muckle wrote: > >> In init_entity_runnable_average() the last_update_time is initialized to > >> zero. The

Re: PELT initial task load and wake_up_new_task()

2015-12-14 Thread Steve Muckle
Hi Yuyang, On 12/13/2015 11:13 AM, Yuyang Du wrote: > Hi Steve, > > On Fri, Dec 11, 2015 at 06:01:45PM -0800, Steve Muckle wrote: >> In init_entity_runnable_average() the last_update_time is initialized to >> zero. The task is given max load and utilization as a pessimistic >> initial estimate. >

Re: PELT initial task load and wake_up_new_task()

2015-12-13 Thread Yuyang Du
Hi Steve, On Fri, Dec 11, 2015 at 06:01:45PM -0800, Steve Muckle wrote: > In init_entity_runnable_average() the last_update_time is initialized to > zero. The task is given max load and utilization as a pessimistic > initial estimate. > > But if in wake_up_new_task() the task is placed on a CPU o

PELT initial task load and wake_up_new_task()

2015-12-11 Thread Steve Muckle
In init_entity_runnable_average() the last_update_time is initialized to zero. The task is given max load and utilization as a pessimistic initial estimate. But if in wake_up_new_task() the task is placed on a CPU other than where it was created, __update_load_avg() will be called via set_task_cpu