[PATCH 1/4] sched/fair: Use protect_slice() instead of direct comparison
From: Vincent Guittot
Date: Fri Jun 13 2025 - 10:10:22 EST
Replace the test by the relevant protect_slice() function.
Signed-off-by: Vincent Guittot <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 83157de5b808..44a09de38ddf 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1178,7 +1178,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);
--
2.43.0