[tip: sched/core] sched/eevdf: Ensure that vprot will never go above a min slice
From: tip-bot2 for Vincent Guittot
Date: Fri Sep 25 2026 - 06:59:05 EST
The following commit has been merged into the sched/core branch of tip:
Commit-ID: aae2a33ea66299f39252bc1891bb4f05f631255d
Gitweb: https://git.kernel.org/tip/aae2a33ea66299f39252bc1891bb4f05f631255d
Author: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
AuthorDate: Mon, 21 Sep 2026 17:22:31 +02:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Fri, 25 Sep 2026 12:45:58 +02:00
sched/eevdf: Ensure that vprot will never go above a min slice
ineligible_vruntime() can be after the duration of a min slice but we
want to make sure that current will not run more than a min slice.
Signed-off-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Link: https://patch.msgid.link/20260921152238.3804392-2-vincent.guittot@xxxxxxxxxx
---
kernel/sched/fair.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2f5c706..0969be2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1128,10 +1128,9 @@ static inline void set_protect_slice(struct cfs_rq *cfs_rq, struct sched_entity
/* If there are shorter slices than se's one */
if (slice != se->slice) {
+ vprot = min_vruntime(vprot, se->vruntime + calc_delta_fair(slice, se));
if (sched_feat(PREEMPT_SHORT))
vprot = min_vruntime(vprot, ineligible_vruntime(cfs_rq));
- else
- vprot = min_vruntime(vprot, se->vruntime + calc_delta_fair(slice, se));
}
se->vprot = vprot;