From: Michael Kao <michael.kao@mediatek.com>
To: Lukasz Luba <lukasz.luba@arm.com>
Cc: Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
<hsinyi@chromium.org>, <linux-pm@vger.kernel.org>,
<srv_heupstream@mediatek.com>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH] thermal: power_allocate: add upper and lower limits
Date: Wed, 29 Apr 2020 18:39:36 +0800 [thread overview]
Message-ID: <1588156776.3573.1.camel@mtksdccf07> (raw)
In-Reply-To: <accb83e0-ffbe-b6e3-6bf9-e7cc8b9fe19c@arm.com>
On Fri, 2020-04-24 at 10:22 +0100, Lukasz Luba wrote:
> Hi Michael,
>
> On 4/24/20 8:16 AM, Michael Kao wrote:
> > The upper and lower limits of thermal throttle state in the
> > device tree do not apply to the power_allocate governor.
> > Add the upper and lower limits to the power_allocate governor.
> >
> > Signed-off-by: Michael Kao <michael.kao@mediatek.com>
> > ---
> > drivers/thermal/thermal_core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> > index 9a321dc548c8..f6feed2265bd 100644
> > --- a/drivers/thermal/thermal_core.c
> > +++ b/drivers/thermal/thermal_core.c
> > @@ -598,7 +598,7 @@ int power_actor_set_power(struct thermal_cooling_device *cdev,
> > if (ret)
> > return ret;
> >
> > - instance->target = state;
> > + instance->target = clamp_val(state, instance->lower, instance->upper);
> > mutex_lock(&cdev->lock);
> > cdev->updated = false;
> > mutex_unlock(&cdev->lock);
> >
>
> Thank you for the patch and having to look at it. I have some concerns
> with this approach. Let's analyze it further.
>
> In default the cooling devices in the thermal zone which is used by IPA
> do not have this 'lower' and 'upper' limits. They are set to
> THERMAL_NO_LIMIT in DT to give full control to IPA over the states.
>
> This the function 'power_actor_set_power' actually translates granted
> power to the state that device will run for the next period.
> The IPA algorithm has already split the power budget.
> Now what happen when the 'lower' value will change the state to a state
> which consumes more power than was calculated in the IPA alg... It will
> became unstable.
>
> I would rather see a change which uses these 'lower' and 'upper' limits
> before the IPA do the calculation of the power budget. But this wasn't
> a requirement and we assumed that IPA has full control over the cooling
> device (which I described above with this DT THERMAL_NO_LIMIT).
>
> Is there a problem with your platform that it has to provide some
> minimal performance, so you tried to introduce this clamping?
>
> Regards,
> Lukasz
Hi Lukasz,
I refer to the documentation settings of the thermal device tree
(Documentation / devicetree / bindings / thermal / thermal.txt).
It shows that cooling-device is a mandatory property, so max/min cooling
state should be able to support in framework point of view.
Otherwise, the limitation should be added in binding document.
Different hardware mechanisms have different heat dissipation
capabilities.
Limiting the input heat source can slow down the heat accumulation and
temperature burst.
We want to reduce the accumulation of heat at high temperature by
limiting the minimum gear of thermal throttle.
Best Regards,
Michael
next prev parent reply other threads:[~2020-04-29 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 7:16 [PATCH] thermal: power_allocate: add upper and lower limits Michael Kao
2020-04-24 9:22 ` Lukasz Luba
2020-04-29 10:39 ` Michael Kao [this message]
2020-04-29 20:24 ` Lukasz Luba
2020-08-25 9:29 ` Michael Kao
2020-10-06 14:39 ` Lukasz Luba
2020-10-06 14:46 ` Lukasz Luba
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=1588156776.3573.1.camel@mtksdccf07 \
--to=michael.kao@mediatek.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=hsinyi@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=srv_heupstream@mediatek.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;
as well as URLs for NNTP newsgroup(s).