Re: [PATCH] sched/fair: Fix wrong flag passed to set_rd_overutilized()
From: Shrikanth Hegde
Date: Wed Apr 10 2024 - 02:12:28 EST
On 4/10/24 1:43 AM, Hongyan Xia wrote:
> In update_sd_lb_stats(), sg_overloaded is passed to
> set_rd_overutilized(). This seems to be a typo during refactoring, which
> breaks many of my local EAS tests because overutilization is mistakenly
> triggered.
>
> This fix makes those EAS tests work again.
>
Yes. This is a needed fix.
> Signed-off-by: Hongyan Xia <hongyan.xia2@xxxxxxx>
FYI, Same patch has been posted by Vincent a week ago.
https://lore.kernel.org/all/20240404155738.2866102-1-vincent.guittot@xxxxxxxxxx/
> ---
> Hi Ingo,
>
> Could you double check if this is the correct fix? Thank you.
>
> ---
> 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 1dd37168da50..bb1ae4ed0d91 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -10661,7 +10661,7 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
> set_rd_overloaded(env->dst_rq->rd, sg_overloaded);
>
> /* Update over-utilization (tipping point, U >= 0) indicator */
> - set_rd_overutilized(env->dst_rq->rd, sg_overloaded);
> + set_rd_overutilized(env->dst_rq->rd, sg_overutilized);
> } else if (sg_overutilized) {
> set_rd_overutilized(env->dst_rq->rd, sg_overutilized);
> }