[PATCH 1/4] sched/fair: Use protect_slice() instead of direct comparison

Vincent Guittot posted 4 patches 3 months, 4 weeks ago
There is a newer version of this series
[PATCH 1/4] sched/fair: Use protect_slice() instead of direct comparison
Posted by Vincent Guittot 3 months, 4 weeks ago
Replace the test by the relevant protect_slice() function.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
 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
Re: [PATCH 1/4] sched/fair: Use protect_slice() instead of direct comparison
Posted by dhaval@gianis.ca 3 months, 4 weeks ago




On Friday, June 13th, 2025 at 7:10 AM, Vincent Guittot <vincent.guittot@linaro.org> wrote:

> 
> 
> Replace the test by the relevant protect_slice() function.
> 
> Signed-off-by: Vincent Guittot vincent.guittot@linaro.org
> 

Reviewed-by: Dhaval Giani (AMD) <dhaval@gianis.ca>

> ---
> 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