linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Anson Huang <anson.huang@nxp.com>,
	"rui.zhang@intel.com" <rui.zhang@intel.com>,
	"amit.kucheria@verdurent.com" <amit.kucheria@verdurent.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH] thermal: imx8mm: Add get_trend ops
Date: Mon, 25 May 2020 13:04:48 +0200	[thread overview]
Message-ID: <dadf94db-8aa5-d1a7-5818-c56032a44ea4@linaro.org> (raw)
In-Reply-To: <DB3PR0402MB39162E6A876BA54A80B0DCE2F5B30@DB3PR0402MB3916.eurprd04.prod.outlook.com>

On 25/05/2020 04:46, Anson Huang wrote:
> Hi, Daniel

[ ... ]

> I tried modifying the min/max to '2' in cooling map, it works that
> whenever cooling action is needed, the max cooling action will be
> applied. But I also noticed some behaviors which NOT as expected:
> 
> 1. to easy the test, I enable the " CONFIG_THERMAL_WRITABLE_TRIPS",
> and just modify the passive trip threshold to trigger the cooling
> action, this is much more easy then putting the board into an oven to
> increase the SoC temperature or running many high loading test to
> increase the temperature, but when I modify the passive trip
> threshold to be lower than current temperature, the cooling action is
> NOT triggered immediately, it is because the default step_wise
> governor will NOT trigger the cooling action when the trend is
> THERMAL_TREND_STABLE. But what expected is, when the temperature is
> exceed the passive trip threshold, the cooling action can be 
> triggered immediately no matter the trend is stable or raising.

You are right, what is expected is, when the temperature exceeds the
passive trip threshold, a cooling action happens, the trend is raising
in this case.

But in your test, it is not what is happening: the trip point is
changing, not the temperature.

Probably, the cpufreq driver is at its lowest OPP, so there is no room
for more cooling effect when changing the trip point.

IMO, the test is not right as the trip point is decreased to a
temperature where actually the SoC is not hot.

If you want to test it easily, I recommend to use dhrystone, something like:

 dhrystone -t 6 -l 10000

That will make your board to heat immediately.

> That
> means we have to implement our own .get_trend callback?

From my POV it must disappear, because it has little meaning. The
governor is the one which should be dealing with that and call the
corresponding cooling index.

> 2. No margin for releasing the cooling action, for example, if
> cooling action is triggered, when the temperature drops below the
> passive trip threshold, the cooling action will be cancelled
> immediately, if SoC keeps running at full performance, the
> temperature will increase very soon, which may cause the SoC keep
> triggering/cancelling the cooling action around the passive trip
> threshold. If there is a margin, the situation will be much better.
> 
> Do you have any idea/comment about them?

Yes, that is a good point. The hysteresis is supposed to do that. There
is a work done by Andrzej Pietrasiewicz to disable / enable the thermal
zones [1]. I think we should be able to fix that after the changes are done.

  -- Daniel

[1] https://www.spinics.net/lists/netdev/msg644762.html


-- 
<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

  reply	other threads:[~2020-05-25 11:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  2:58 [PATCH] thermal: imx8mm: Add get_trend ops Anson Huang
2020-05-22 17:33 ` Daniel Lezcano
2020-05-23  0:35   ` Anson Huang
2020-05-23 12:33     ` Daniel Lezcano
2020-05-24  0:50       ` Anson Huang
2020-05-25  2:46         ` Anson Huang
2020-05-25 11:04           ` Daniel Lezcano [this message]
2020-05-25 15:05             ` Anson Huang
2020-05-27 12:26               ` Anson Huang

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=dadf94db-8aa5-d1a7-5818-c56032a44ea4@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amit.kucheria@verdurent.com \
    --cc=anson.huang@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.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;
as well as URLs for NNTP newsgroup(s).