Re: [PATCH] sched/uclamp: Fix uclamp_tg_restrict()

From: Qais Yousef
Date: Thu Jun 17 2021 - 04:58:42 EST


Hi Xuewen

On 06/16/21 11:06, Xuewen Yan wrote:
> Hi Qais
>
> Sorry for the late reply.
>
> I tested the patch on the "UNISOC T610" platform, and it looks fine.
>
> According to the two cases:
> case1:
> without patch:
> set task's clamp_min=614(60%), clamp_max=819(80%), the result as:
> [ 215.780435]c6 uclamp_test :
> pid=138,req_min=614,req_max=819,eff_min=614,eff_max=819
>
> after set tg's cpu.uclamp.max = 50%,the result:
> [ 420.580443]c6 uclamp_test :
> pid=138,req_min=614,req_max=819,eff_min=614,eff_max=512
>
> with patch:
> set task's clamp_min=614(60%), clamp_max=819(80%), the result as:
> [ 333.533878]c7 uclamp_test :
> pid=138,req_min=614,req_max=819,eff_min=614,eff_max=819
>
> after set tg's cpu.uclamp.max = 50%,the result:
> [ 430.813789]c6 uclamp_test :
> pid=138,req_min=614,req_max=819,eff_min=512,eff_max=512
>
> case2:
> without patch:
> set task's clamp_min=614(60%), clamp_max=819(80%), the result as:
> [ 169.700544]c0 uclamp_test :
> pid=137,req_min=0,req_max=209,eff_min=0,eff_max=209
>
> after set tg's cpu.uclamp.min = 30%, tg's cpu.uclamp.max = 50%,the result:
> [ 246.500634]c7 uclamp_test :
> pid=137,req_min=0,req_max=209,eff_min=307,eff_max=209
>
> with patch:
> set task's clamp_min=0(0%), clamp_max=209(20%), the result as:
> [ 169.700544]c0 uclamp_test :
> pid=137,req_min=0,req_max=209,eff_min=0,eff_max=209
>
> after set tg's cpu.uclamp.min = 30%, tg's cpu.uclamp.max = 50%,the result:
> [ 179.933868]c6 uclamp_test :
> pid=137,req_min=0,req_max=209,eff_min=307,eff_max=307

Thanks a lot for trying it out.

Cheers

--
Qais Yousef