Re: [RFC/PATCH] sched/fair: Remove unnecessary judgment in pick_next_task_fair()
From: Christian Loehle
Date: Mon Sep 09 2024 - 07:26:40 EST
On 9/9/24 06:13, Benjamin Tang wrote:
> sched/fair: Remove unnecessary judgment in pick_next_task_fair()
>
> Since 'curr' argument is no longer needed in pick_next_entity(),
> remove unnecessary judgment.
>
> Signed-off-by: Benjamin Tang <tangsong8264@xxxxxxxxx>
> ---
> kernel/sched/fair.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 9057584ec06d..92f8ad778205 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -8492,8 +8492,6 @@ pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf
> if (curr) {
> if (curr->on_rq)
> update_curr(cfs_rq);
> - else
> - curr = NULL;
>
> /*
> * This call to check_cfs_rq_runtime() will do the
This has been reworked on tip/sched/core and is no longer needed:
[PATCH 05/24] sched/fair: Unify pick_{,next_}_task_fair()
https://lore.kernel.org/all/20240727105028.725062368@xxxxxxxxxxxxx/