Re: [PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-10 Thread Vincent Guittot
On 10 April 2013 09:26, Peter Zijlstra wrote: > On Tue, 2013-04-09 at 11:06 +0200, Vincent Guittot wrote: >> >> +void idle_enter(struct rq *this_rq) >> >> +{ >> >> + update_rq_runnable_avg(this_rq, 1); >> >> +} > >> >> +void idle_exit(struct rq *this_rq) >> >> +{ >> >> + update_rq_runn

Re: [PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-10 Thread Peter Zijlstra
On Tue, 2013-04-09 at 11:06 +0200, Vincent Guittot wrote: > >> +void idle_enter(struct rq *this_rq) > >> +{ > >> + update_rq_runnable_avg(this_rq, 1); > >> +} > >> +void idle_exit(struct rq *this_rq) > >> +{ > >> + update_rq_runnable_avg(this_rq, 0); > >> +} > > > > These seem like fai

Re: [PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-09 Thread Vincent Guittot
On 9 April 2013 15:16, Steven Rostedt wrote: > On Tue, 2013-04-09 at 14:18 +0200, Vincent Guittot wrote: >> On 9 April 2013 10:55, Peter Zijlstra wrote: >> > On Thu, 2013-04-04 at 16:15 +0200, Vincent Guittot wrote: >> >> Changes since V2: >> >> - remove useless definition for UP platform >> >> -

Re: [PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-09 Thread Steven Rostedt
On Tue, 2013-04-09 at 14:18 +0200, Vincent Guittot wrote: > On 9 April 2013 10:55, Peter Zijlstra wrote: > > On Thu, 2013-04-04 at 16:15 +0200, Vincent Guittot wrote: > >> Changes since V2: > >> - remove useless definition for UP platform > >> - rebased on top of Steven Rostedt's patches : > >> ht

Re: [PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-09 Thread Vincent Guittot
On 9 April 2013 10:55, Peter Zijlstra wrote: > On Thu, 2013-04-04 at 16:15 +0200, Vincent Guittot wrote: >> Changes since V2: >> - remove useless definition for UP platform >> - rebased on top of Steven Rostedt's patches : >> https://lkml.org/lkml/2013/2/12/558 > > So what's the status of those pa

Re: [PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-09 Thread Vincent Guittot
On 9 April 2013 10:50, Peter Zijlstra wrote: > On Thu, 2013-04-04 at 16:15 +0200, Vincent Guittot wrote: >> Signed-off-by: Vincent Guittot >> --- >> kernel/sched/fair.c | 23 +-- >> kernel/sched/idle_task.c | 10 ++ >> kernel/sched/sched.h | 12

Re: [PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-09 Thread Peter Zijlstra
On Thu, 2013-04-04 at 16:15 +0200, Vincent Guittot wrote: > Changes since V2: > - remove useless definition for UP platform > - rebased on top of Steven Rostedt's patches : > https://lkml.org/lkml/2013/2/12/558 So what's the status of those patches? I still worry about the extra context switch ove

Re: [PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-09 Thread Peter Zijlstra
On Thu, 2013-04-04 at 16:15 +0200, Vincent Guittot wrote: > Signed-off-by: Vincent Guittot > --- > kernel/sched/fair.c | 23 +-- > kernel/sched/idle_task.c | 10 ++ > kernel/sched/sched.h | 12 > 3 files changed, 43 insertions(+), 2 deletion

[PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-04 Thread Vincent Guittot
The current update of the rq's load can be erroneous when RT tasks are involved The update of the load of a rq that becomes idle, is done only if the avg_idle is less than sysctl_sched_migration_cost. If RT tasks and short idle duration alternate, the runnable_avg will not be updated correctly and