[tip: sched/core] sched/eevdf: Update slice protection even when resched is already set
From: tip-bot2 for Vincent Guittot
Date: Tue Jun 30 2026 - 05:04:25 EST
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 7ad0ec7890b306dab20e53a02cadd867c92ea513
Gitweb: https://git.kernel.org/tip/7ad0ec7890b306dab20e53a02cadd867c92ea513
Author: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
AuthorDate: Wed, 24 Jun 2026 17:12:26 +02:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Tue, 30 Jun 2026 10:56:54 +02:00
sched/eevdf: Update slice protection even when resched is already set
Even if resched is already set, we might want to update or even cancel
the slice protection and ensure that the newly waking task will be the
next one to run.
Signed-off-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Tested-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
Link: https://patch.msgid.link/20260624151229.1710703-4-vincent.guittot@xxxxxxxxxx
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index cadbb11..af207f0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9848,7 +9848,7 @@ static void wakeup_preempt_fair(struct rq *rq, struct task_struct *p, int wake_f
* prevents us from potentially nominating it as a false LAST_BUDDY
* below.
*/
- if (test_tsk_need_resched(rq->curr))
+ if (!sched_feat(PREEMPT_SHORT) && test_tsk_need_resched(rq->curr))
return;
if (!sched_feat(WAKEUP_PREEMPTION))