sched/fair: Use protect_slice() instead of direct comparison

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
This commit is contained in:
Vincent Guittot 2025-07-08 18:56:25 +02:00 committed by Peter Zijlstra
parent cccb45d7c4
commit 9cdb4fe20c

View 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);