From: Ram Chandrasekar <rkumbako@codeaurora.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
Amit Kucheria <amit.kucheria@linaro.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
bjorn.andersson@linaro.org, swboyd@chromium.org,
j-keerthy@ti.com, thara.gopinath@linaro.org,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Amit Kucheria <amit.kucheria@verdurent.com>
Cc: Lina Iyer <ilina@codeaurora.org>, linux-pm@vger.kernel.org
Subject: Re: [PATCH] drivers: thermal: step_wise: add support for hysteresis
Date: Fri, 24 Jan 2020 10:13:07 -0700 [thread overview]
Message-ID: <79a9c316-ee21-4a8c-ce98-9bbc0ff1f537@codeaurora.org> (raw)
In-Reply-To: <211a066d-f801-fb21-a14d-2b00765d2547@linaro.org>
On 1/9/2020 3:46 PM, Daniel Lezcano wrote:
> On 08/01/2020 01:31, Ram Chandrasekar wrote:
>>
>>
>> On 12/11/2019 6:35 AM, Daniel Lezcano wrote:
>>> On 21/11/2019 06:50, Amit Kucheria wrote:
>>>> From: Ram Chandrasekar <rkumbako@codeaurora.org>
>>>>
>>>> Currently, step wise governor increases the mitigation when the
>>>> temperature goes above a threshold and decreases the mitigation when the
>>>> temperature goes below the threshold.
>>>>
>>>> If there is a case where the
>>>> temperature is wavering around the threshold, the mitigation will be
>>>> applied and removed every iteration, which is not very efficient.
>>>>
>>>> The use of hysteresis temperature could avoid this ping-pong of
>>>> mitigation by relaxing the mitigation to happen only when the
>>>> temperature goes below this lower hysteresis value.
>>>
>>> What I'm worried about is how the hysteresis is used in the current
>>> code, where the destination of this data is to set the value in the
>>> sensor hardware if it is supported.
>>>
>>> Using the hysteresis in the governor seems like abusing the initial
>>> purpose of this information.
>>>
>>> Moreover, the hysteresis creates a gray area where the above algorithm
>>> (DROPPING && !throttle) => state-- or (RAISING && throttle) => state++
>>> may drop the performances because we will continue mitigating even below
>>> the threshold.
>>>
>>> As the governor is an open-loop controller, I'm not sure if we can do
>>> something except adding some kind of low pass filter to prevent
>>> mitigation bounces.
>>>
>>
>> We have two different use cases for the step wise algorithm, and the
>> hysteresis makes sense only in one.
>>
>> For example, say we are controlling CPU junction temperature at 95C.
>> When using step wise, mitigation is applied iteratively and there is a
>> possibility that temperature can shoot up before the algorithm can reach
>> an optimal mitigation level to keep the temperature near threshold.
>>
>> In order to help this state machine, we use a second back stop rule in
>> the same thermal zone at a higher temperature (say 105C) with a
>> hysteresis of 10C to mitigate CPU to a fixed value, by specifying
>> upper/lower limit to be the same. The idea is that the second rule will
>> place a hard hammer to bring the temperature down close to 95C and then
>> it will remove the mitigation. Once mitigation is removed, the junction
>> temperature rule state machine will re-adjust from that point to an
>> optimal mitigation level. The junction temperature rule doesn’t use
>> hysteresis.
>>
>> Another example is skin temperature mitigation for mobile devices, where
>> the step wise algorithm with hysteresis just reduces the operating max
>> frequency to a fixed value, when the threshold is reached. And the
>> junction temperature rule starts mitigating from this operating max.
>>
>> That is the reason we have not generalized or mandated the hysteresis
>> usage in this patch. The idea is to use it selectively based on use case.
>
> Did you ever try the IPA governor?
>
>
Yes. We understand IPA could bring down the power/frequency cap multiple
levels compared to step wise which is doing iteratively. With cooling
device weights this makes IPA good for skin temperature control. But
when we evaluated IPA, we found step wise is giving a better performance
compared to IPA for localized junction temperature rules. Additionally,
step wise for the junction temperature rule is easier to tune with fewer
parameters. With these additional enhancements, step wise turned out to
be a better choice for local junction temperature rules.
next prev parent reply other threads:[~2020-01-24 17:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 5:50 Amit Kucheria
2019-11-21 14:09 ` Thara Gopinath
2019-11-21 14:38 ` Amit Kucheria
2019-11-21 21:07 ` Thara Gopinath
2019-11-21 20:57 ` Thara Gopinath
2019-12-10 6:51 ` Amit Kucheria
2019-12-11 13:35 ` Daniel Lezcano
2020-01-08 0:31 ` Ram Chandrasekar
2020-01-09 22:46 ` Daniel Lezcano
2020-01-24 17:13 ` Ram Chandrasekar [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-07 17:54 Lina Iyer
2018-05-08 2:04 ` Daniel Lezcano
2018-05-09 16:25 ` Lina Iyer
2018-07-26 8:49 ` Zhang Rui
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=79a9c316-ee21-4a8c-ce98-9bbc0ff1f537@codeaurora.org \
--to=rkumbako@codeaurora.org \
--cc=amit.kucheria@linaro.org \
--cc=amit.kucheria@verdurent.com \
--cc=bjorn.andersson@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=ilina@codeaurora.org \
--cc=j-keerthy@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=swboyd@chromium.org \
--cc=thara.gopinath@linaro.org \
/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
Powered by JetHome