From: Vincent Guittot Date: Tue, 8 Jul 2025 16:56:25 +0000 (+0200) Subject: sched/fair: Use protect_slice() instead of direct comparison X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cdb4fe20cd239c848b5c3f5753d83a9443ba329;p=thirdparty%2Fkernel%2Fstable.git sched/fair: Use protect_slice() instead of direct comparison Replace the test by the relevant protect_slice() function. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dhaval Giani (AMD) Link: https://lkml.kernel.org/r/20250708165630.1948751-2-vincent.guittot@linaro.org --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a1350c513a87..43fe5c831dd5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1161,7 +1161,7 @@ static inline bool did_preempt_short(struct cfs_rq *cfs_rq, struct sched_entity if (!sched_feat(PREEMPT_SHORT)) return false; - if (curr->vlag == curr->deadline) + if (protect_slice(curr)) return false; return !entity_eligible(cfs_rq, curr);