[PATCH] sched/fair: Fix wrong flag passed to set_rd_overutilized()

Hongyan Xia posted 1 patch 1 year, 10 months ago
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] sched/fair: Fix wrong flag passed to set_rd_overutilized()
Posted by Hongyan Xia 1 year, 10 months ago
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.

Signed-off-by: Hongyan Xia <hongyan.xia2@arm.com>

---
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);
 	}
-- 
2.34.1
Re: [PATCH] sched/fair: Fix wrong flag passed to set_rd_overutilized()
Posted by Shrikanth Hegde 1 year, 10 months ago

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@arm.com>
 

FYI, Same patch has been posted by Vincent a week ago. 
https://lore.kernel.org/all/20240404155738.2866102-1-vincent.guittot@linaro.org/


> ---
> 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);
>  	}
Re: [PATCH] sched/fair: Fix wrong flag passed to set_rd_overutilized()
Posted by Hongyan Xia 1 year, 10 months ago
On 10/04/2024 07:11, Shrikanth Hegde wrote:
> 
> 
> 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@arm.com>
>   
> 
> FYI, Same patch has been posted by Vincent a week ago.
> https://lore.kernel.org/all/20240404155738.2866102-1-vincent.guittot@linaro.org/

Thank you. Somehow I missed it in my inbox.