[PATCH 13/18 v2] sched/eevdf: Push short slice task that are not picked

From: Vincent Guittot

Date: Fri Oct 02 2026 - 11:47:06 EST


Even when set as next buddy, a number of event can prevent short slice
task to not 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.

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 186f10173eed..cccdc40b8a24 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9981,6 +9981,12 @@ static void fair_add_pushable_prev(struct rq *rq, struct task_struct *prev, stru
__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);

/*
@@ -10419,8 +10425,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