]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sched/fair: Use protect_slice() instead of direct comparison
authorVincent Guittot <vincent.guittot@linaro.org>
Tue, 8 Jul 2025 16:56:25 +0000 (18:56 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 9 Jul 2025 11:40:22 +0000 (13:40 +0200)
Replace the test by the relevant protect_slice() function.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dhaval Giani (AMD) <dhaval@gianis.ca>
Link: https://lkml.kernel.org/r/20250708165630.1948751-2-vincent.guittot@linaro.org
kernel/sched/fair.c

index a1350c513a87db785aeee271d2f38bba528dfc8e..43fe5c831dd59787fdafac19b967bde50b9da706 100644 (file)
@@ -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);