Re: [PATCH 13/20] sched/eevdf: Try to push short slice task on a better CPU

From: Li kunyu

Date: Fri Nov 13 2026 - 06:53:51 EST




On 2026/11/6 23:19, Vincent Guittot wrote:
> static bool fair_check_pushable_task(struct rq *rq, struct task_struct *p, struct task_struct *next)
> {
> if (!__check_pushable_fair_task(rq, p))
> @@ -10120,6 +10137,12 @@ static bool fair_check_pushable_task(struct rq *rq, struct task_struct *p, struc
> if (next == p)
> return false;
>
> + if (next && next->sched_class != p->sched_class)
> + return true;

Would it be more appropriate to use sched_class_above(next->sched_class,
&fair_sched_class) here? I think placing prev on rq->cfs.pushable_tasks is
justified only​ when next belongs to a scheduling class strictly higher than fair.

I also wonder whether doing this in the normal CFS hot paths -
put_prev_task_fair(), set_next_task_fair() is really desirable. PATCH 09/20
already replaces the unconditional raw_spin_rq_unlock() + task_rq_lock()
sequence with a raw_spin_trylock(&next_task->pi_lock) that skips the push when
the task is already locked, which I agree is an improvement.
But could the push decision itself be moved into the load balancing path
instead? That would keep the hot paths free of migration-related locking and
select_task_rq_fair() calls. Or is the next-aware context (knowing which task is
preempting) something the load balancer cannot reconstruct, making the current
placement necessary?

Is my understanding correct?

https://lore.kernel.org/all/20261020083746.37068-2-likunyu@xxxxxxxxxxxxxx/

The SMT push work in this patch is intentionally quite simple; I think
it could be generalized with only modest changes to perform push at
larger scheduling-domain scopes, such as the LLC (last-level cache)
domain.

I realize the push direction is somewhat at odds with the current
cache-aware scheduling work, which instead tries to make cross-LLC
migration less attractive. Still, I'd be interested to hear whether you
see any value in a push-based approach at the LLC level, or if there
are related plans I should be aware of.

--
thanks,
kunyu