lkml.org 
[lkml]   [2021]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] thermal: power_allocator: using round the division when re-divvying up power
From
Date


On 3/16/21 1:15 PM, Daniel Lezcano wrote:
> On 15/03/2021 10:51, Lukasz Luba wrote:
>>
>>
>> On 3/15/21 8:25 AM, gao.yunxiao6@gmail.com wrote:
>>> From: "jeson.gao" <jeson.gao@unisoc.com>
>>>
>>> The division is used directly in re-divvying up power, the decimal
>>> part will
>>> be discarded, devices will get less than the extra_actor_power - 1.
>>> if using round the division to make the calculation more accurate.
>>>
>>> For example:
>>> actor0 received more than it's max_power, it has the extra_power 759
>>> actor1 received less than it's max_power, it require extra_actor_power
>>> 395
>>> actor2 received less than it's max_power, it require extra_actor_power
>>> 365
>>> actor1 and actor2 require the total capped_extra_power 760
>>>
>>> using division in re-divvying up power
>>> actor1 would actually get the extra_actor_power 394
>>> actor2 would actually get the extra_actor_power 364
>>>
>>> if using round the division in re-divvying up power
>>> actor1 would actually get the extra_actor_power 394
>>> actor2 would actually get the extra_actor_power 365
>>>
>>> Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
>>> ---
>
> Applied, thanks
>

thank you Daniel!

\
 
 \ /
  Last update: 2021-03-16 14:17    [W:0.271 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site