[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <98454769-3b46-4e79-b503-1315408c8a9d@arm.com>
Date: Wed, 10 Dec 2025 15:01:21 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>, mingo@...hat.com,
peterz@...radead.org, juri.lelli@...hat.com, rostedt@...dmis.org,
bsegall@...gle.com, mgorman@...e.de, vschneid@...hat.com,
linux-kernel@...r.kernel.org, pierre.gondois@....com, kprateek.nayak@....com
Cc: qyousef@...alina.io, christian.loehle@....com
Subject: Re: [PATCH 4/6 v8] sched/fair: Add push task mechanism for fair
- hongyan.xia2@....com
- luis.machado@....com
On 02.12.25 19:12, Vincent Guittot wrote:
> EAS is based on wakeup events to efficiently place tasks on the system, but
> there are cases where a task doesn't have wakeup events anymore or at a far
> too low pace. For such situation, we can take advantage of the task being
> put back in the enqueued list to check if it should be pushed on another
> CPU.
> When the task is alone on the CPU, it's never put back in the enqueued
> list; In this special case, we use the tick to run the check.
>
> Add a push task mechanism that enables fair scheduler to push runnable
> tasks. EAS will be one user but other feature like filling idle CPUs
> can also take advantage of it.
[...]
> +/*
> + * See if the non running fair tasks on this rq can be sent on other CPUs
> + * that fits better with their profile.
> + */
> +static bool push_fair_task(struct rq *rq)
> +{
> + struct task_struct *next_task;
> + int prev_cpu, new_cpu;
> + struct rq *new_rq;
> +
> + next_task = pick_next_pushable_fair_task(rq);
> + if (!next_task)
> + return false;
> +
> + if (is_migration_disabled(next_task))
> + return true;
> +
> + /* We might release rq lock */
> + get_task_struct(next_task);
> +
> + prev_cpu = rq->cpu;
> +
select_task_rq_fair() requires p->pi_lock to be held. I assume
check_pushable_task() (push single running task) has the same issue.
> + new_cpu = select_task_rq_fair(next_task, prev_cpu, 0);
> +
[...]
Powered by blists - more mailing lists