Re: [PATCH 08/20 v3] sched/fair: Add push task mechanism for fair
From: Peter Zijlstra
Date: Mon Nov 09 2026 - 09:45:58 EST
On Fri, Nov 06, 2026 at 04:19:35PM +0100, Vincent Guittot wrote:
> +static struct task_struct *pick_next_pushable_fair_task(struct rq *rq)
> +{
> + struct task_struct *p;
> +
> + if (!has_pushable_tasks(rq))
> + return NULL;
> +
> + p = plist_first_entry(&rq->cfs.pushable_tasks,
> + struct task_struct, pushable_tasks);
> +
> + WARN_ON_ONCE(rq->cpu != task_cpu(p));
> + WARN_ON_ONCE(task_current(rq, p));
> + WARN_ON_ONCE(p->nr_cpus_allowed <= 1);
> + WARN_ON_ONCE(!task_on_rq_queued(p));
> +
> + /*
> + * Remove task from the pushable list as we try only once after that
> + * the task has been put back in enqueued list.
> + */
> + plist_del(&p->pushable_tasks, &rq->cfs.pushable_tasks);
> +
> + return p;
> +}
This means a task will only be pushed once? After which it needs to be
re-enqueued on the runqueue?
So if it was found during migrate_disable(), its thereafter stuck? --
this seems a little weird.