From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Lukasz Luba <lukasz.luba@arm.com>, gao.yunxiao6@gmail.com
Cc: rui.zhang@intel.com, amitk@kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, orsonzhai@gmail.com,
zhang.lyra@gmail.com, "jeson.gao" <jeson.gao@unisoc.com>
Subject: Re: [PATCH] thermal: power_allocator: using round the division when re-divvying up power
Date: Tue, 16 Mar 2021 14:15:15 +0100 [thread overview]
Message-ID: <381a12bf-c917-c2c4-1915-f129221d6475@linaro.org> (raw)
In-Reply-To: <9c14451e-be6f-0713-4c26-8b67e1fa51a5@arm.com>
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
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2021-03-16 13:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 8:25 gao.yunxiao6
2021-03-15 9:51 ` Lukasz Luba
2021-03-16 13:15 ` Daniel Lezcano [this message]
2021-03-16 13:16 ` Lukasz Luba
2021-03-17 11:20 ` gao yunxiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=381a12bf-c917-c2c4-1915-f129221d6475@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=gao.yunxiao6@gmail.com \
--cc=jeson.gao@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=orsonzhai@gmail.com \
--cc=rui.zhang@intel.com \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®