Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
From: Anson Huang <anson.huang@nxp.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	"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: Sat, 23 May 2020 00:35:10 +0000
Message-ID: <DB3PR0402MB3916B6D11328A036BD479D39F5B50@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <fccf4197-d0ca-f313-8f70-000ef4731033@linaro.org>

Hi, Daniel


> Subject: Re: [PATCH] thermal: imx8mm: Add get_trend ops
> 
> On 13/05/2020 04:58, Anson Huang wrote:
> > Add get_trend ops for i.MX8MM thermal to apply fast cooling mechanism,
> > when temperature exceeds passive trip point, the highest cooling
> > action will be applied, and when temperature drops to lower than the
> > margin below passive trip point, the lowest cooling action will be
> > applied.
> 
> You are not describing what is the goal of this change.

The goal of this change is to make sure whenever temperature exceeds passive trip point,
the highest cooling action will be applied immediately, e.g., if there are many cpufreq OPP,
the default cooling will be step by step, it will take some more rounds to make cpufreq drop
to lowest OPP, while on i.MX, we expect the cpufreq drop to lowest OPP immediately.

> 
> IIUC, the resulting change will be an on/off action. The thermal zone is
> mitigated with the highest cooling effect, so the lowest OPP, then the
> temperature trend is stable until it goes below the trip - margin where the
> mitigation is stopped.

Yes, your understanding is correctly, once the temperature exceeds passive trip point,
the highest cooling action will be applied immediately and then it will be stable there
until temperature drop to trip - margin, then the cooling action will be cancelled, the
margin is to avoid the back and forth near the passive trip point.

> 
> Except, I'm missing something, setting a trip point with a 10000 hysteresis and
> a cooling map min/max set to the highest opp will result on the same.

Yes setting cooling map min/max cooling state to highest OPP will make the highest
cooling action applied immediately, and to have the function of cooling action being
cancelled when temperature drops to trip - margin, I have to define another trip point,
say passive trip point is 85000, and cooling map min/max set to highest OPP in passive
trip point then add another trip point named "active" with 75000, and without any
cooling map in it, right?

If yes, then I think I can try to make the changes in DT instead of thermal driver. 

Thanks,
Anson

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  2:58 Anson Huang
2020-05-22 17:33 ` Daniel Lezcano
2020-05-23  0:35   ` Anson Huang [this message]
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
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=DB3PR0402MB3916B6D11328A036BD479D39F5B50@DB3PR0402MB3916.eurprd04.prod.outlook.com \
    --to=anson.huang@nxp.com \
    --cc=amit.kucheria@verdurent.com \
    --cc=daniel.lezcano@linaro.org \
    --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

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org
	public-inbox-index linux-pm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git