Re: [PATCH 1/4] sched/fair: Use protect_slice() instead of direct comparison
From: dhaval
Date: Fri Jun 13 2025 - 13:40:07 EST
On Friday, June 13th, 2025 at 7:10 AM, Vincent Guittot <vincent.guittot@xxxxxxxxxx> wrote:
>
>
> Replace the test by the relevant protect_slice() function.
>
> Signed-off-by: Vincent Guittot vincent.guittot@xxxxxxxxxx
>
Reviewed-by: Dhaval Giani (AMD) <dhaval@xxxxxxxxx>
> ---
> 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