[PATCH 14/20 v3] sched/eevdf: Push short slice task that are not picked

From: Vincent Guittot

Date: Fri Nov 06 2026 - 10:27:29 EST


Even when set as next buddy, a number of event can prevent short slice
task to be picked. Add the task in the pushable list in case it is not
picked so it get a chance to be pushed on a better CPU.

This can typically happen when several short slice tasks are pushed on the
same CPU at wake up.

If the task is picked, it will be removed from the pushable list before we
queue the callback otherwise we will look for a better CPU.

Signed-off-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
---
kernel/sched/fair.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 3923587b66e0..894bee51b99a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10273,6 +10273,12 @@ static void fair_add_pushable_prev(struct rq *rq, struct task_struct *prev,
__fair_add_pushable_task(rq, prev);
}

+static void fair_add_pushable_short(struct rq *rq, struct task_struct *p)
+{
+ if (sched_push_task_enabled() && __check_pushable_fair_task(rq, p))
+ __fair_add_pushable_task(rq, p);
+}
+
static int active_load_balance_cpu_stop(void *data);

/*
@@ -10723,8 +10729,10 @@ static void wakeup_preempt_fair(struct rq *rq, struct task_struct *p, int wake_f
preempt:
cancel_protect_slice(se);

- if (preempt_action == PREEMPT_WAKEUP_SHORT)
+ if (preempt_action == PREEMPT_WAKEUP_SHORT) {
set_short_buddy(cfs_rq, pse);
+ fair_add_pushable_short(rq, p);
+ }

resched_curr_lazy(rq);
}
--
2.53.0