Re: [PATCH -v2 15/17] sched: Fix migrate_disable() vs rt/dl balancing

From: Peter Zijlstra
Date: Mon Oct 12 2020 - 07:28:51 EST


On Mon, Oct 12, 2020 at 11:56:09AM +0200, Dietmar Eggemann wrote:
> On 05/10/2020 16:57, Peter Zijlstra wrote:
>
> [...]
>
> > --- a/kernel/sched/rt.c
> > +++ b/kernel/sched/rt.c
> > @@ -1859,7 +1859,7 @@ static struct task_struct *pick_next_pus
> > * running task can migrate over to a CPU that is running a task
> > * of lesser priority.
> > */
> > -static int push_rt_task(struct rq *rq)
> > +static int push_rt_task(struct rq *rq, bool pull)
> > {
> > struct task_struct *next_task;
> > struct rq *lowest_rq;
> > @@ -1873,6 +1873,34 @@ static int push_rt_task(struct rq *rq)
> > return 0;
> >
> > retry:
> > + if (is_migration_disabled(next_task)) {
> > + struct task_struct *push_task = NULL;
> > + int cpu;
> > +
> > + if (!pull || rq->push_busy)
> > + return 0;
>
> Shouldn't there be the same functionality in push_dl_task(), i.e.
> returning 0 earlier for a task with migration_disabled?

No, deadline didn't implement HAVE_RT_PUSH_IPI.