Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-26 Thread Peter Zijlstra
On Thu, Nov 26, 2020 at 11:17:48AM +0100, Vincent Guittot wrote: > > Something like so then? > > yes. it seems ok > > > > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -6982,20 +6982,29 @@ static void check_preempt_wakeup(struct > > #ifdef CONFIG_SMP > > static struct

Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-26 Thread Vincent Guittot
On Thu, 26 Nov 2020 at 10:07, Peter Zijlstra wrote: > > On Wed, Nov 25, 2020 at 05:28:36PM +0100, Vincent Guittot wrote: > > On Wed, 18 Nov 2020 at 00:20, Joel Fernandes (Google) > > > > +#ifdef CONFIG_SMP > > > +static struct task_struct *pick_task_fair(struct rq *rq) > > > +{ > > > +

Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-26 Thread Peter Zijlstra
On Wed, Nov 25, 2020 at 05:28:36PM +0100, Vincent Guittot wrote: > On Wed, 18 Nov 2020 at 00:20, Joel Fernandes (Google) > > +#ifdef CONFIG_SMP > > +static struct task_struct *pick_task_fair(struct rq *rq) > > +{ > > + struct cfs_rq *cfs_rq = >cfs; > > + struct sched_entity *se; > > +

Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-25 Thread Balbir Singh
On Fri, Nov 20, 2020 at 11:58:54AM -0500, Joel Fernandes wrote: > On Fri, Nov 20, 2020 at 10:56:09AM +1100, Singh, Balbir wrote: > [..] > > > +#ifdef CONFIG_SMP > > > +static struct task_struct *pick_task_fair(struct rq *rq) > > > +{ > > > + struct cfs_rq *cfs_rq = >cfs; > > > + struct

Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-25 Thread Vincent Guittot
On Wed, 18 Nov 2020 at 00:20, Joel Fernandes (Google) wrote: > > From: Peter Zijlstra > > Because sched_class::pick_next_task() also implies > sched_class::set_next_task() (and possibly put_prev_task() and > newidle_balance) it is not state invariant. This makes it unsuitable > for remote task

Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-20 Thread Joel Fernandes
On Fri, Nov 20, 2020 at 10:56:09AM +1100, Singh, Balbir wrote: [..] > > +#ifdef CONFIG_SMP > > +static struct task_struct *pick_task_fair(struct rq *rq) > > +{ > > + struct cfs_rq *cfs_rq = >cfs; > > + struct sched_entity *se; > > + > > + if (!cfs_rq->nr_running) > > + return

Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-19 Thread Singh, Balbir
On 18/11/20 10:19 am, Joel Fernandes (Google) wrote: > From: Peter Zijlstra > > Because sched_class::pick_next_task() also implies > sched_class::set_next_task() (and possibly put_prev_task() and > newidle_balance) it is not state invariant. This makes it unsuitable > for remote task selection.

[PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Because sched_class::pick_next_task() also implies sched_class::set_next_task() (and possibly put_prev_task() and newidle_balance) it is not state invariant. This makes it unsuitable for remote task selection. Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra