Re: [PATCH] sched/eevdf: Remove redundant RUN_TO_PARITY check

From: Kayra Cizmeci

Date: Tue Oct 13 2026 - 11:54:42 EST


> update_protect_slice() is only called from wakeup_preempt_fair() when
> RUN_TO_PARITY is enabled. Remove RUN_TO_PARITY check inside
> update_protect_slice() and use cfs_rq_min_slice() directly.

> Signed-off-by: Elif Topuz <elif.topuz@xxxxxxx>
> ---
> kernel/sched/fair.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)

> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index b42a0ca2a69e..f493fa29aed6 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1133,13 +1133,8 @@ static inline void set_protect_slice(struct cfs_rq *cfs_rq, struct sched_entity
> static inline void update_protect_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
> {
> u64 vruntime = min_vruntime(se->vruntime, avg_vruntime(cfs_rq));
> - u64 slice = normalized_sysctl_sched_base_slice;
> - u64 vprot;
> -
> - if (sched_feat(RUN_TO_PARITY))
> - slice = cfs_rq_min_slice(cfs_rq);
> -
> - vprot = min_vruntime(se->vprot, vruntime + calc_delta_fair(slice, se));
> + u64 slice = cfs_rq_min_slice(cfs_rq);
> + u64 vprot = min_vruntime(se->vprot, vruntime + calc_delta_fair(slice, se));
>
> if (sched_feat(PREEMPT_SHORT) && slice != se->slice)
> vprot = min_vruntime(vprot, ineligible_vruntime(cfs_rq));

LGTM.

> base-commit: 4a3b51aab6e25244d97936aa65e6d5425adf98e1

Finally someone who enters their base commit...

I boot tested the changes. Did some work to test it. It's pointless, but
still I wanted to do some test. Because IDK.

Yeah well,

Tested-by: Kayra Cizmeci <kayracizmeci@xxxxxxxxx>
Reviewed-by: Kayra Cizmeci <kayracizmeci@xxxxxxxxx>