All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Perret <qperret@google.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	Vincent Donnefort <vincent.donnefort@arm.com>,
	lukasz.luba@arm.com, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Fabio Estevam <festevam@gmail.com>,
	Kevin Hilman <khilman@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 0/8] cpufreq: Auto-register with energy model
Date: Wed, 11 Aug 2021 10:34:09 +0100	[thread overview]
Message-ID: <YROZkbMEMAeXMt1W@google.com> (raw)
In-Reply-To: <20210811091321.xtb776q4t6cwyanx@vireshk-i7>

On Wednesday 11 Aug 2021 at 14:43:21 (+0530), Viresh Kumar wrote:
> On 11-08-21, 09:37, Quentin Perret wrote:
> > On Wednesday 11 Aug 2021 at 10:48:59 (+0530), Viresh Kumar wrote:
> > > I had to use the pm-opp version, since almost everyone was using that.
> > > 
> > > On the other hand, there isn't a lot of OPP specific stuff in
> > > dev_pm_opp_of_register_em(). It just uses dev_pm_opp_get_opp_count(),
> > > that's all. This ended up in the OPP core, nothing else. Maybe we can
> > > now move it back to the EM core and name it differently ?
> > 
> > Well it also uses dev_pm_opp_find_freq_ceil() and
> > dev_pm_opp_get_voltage(), so not sure how easy it will be to move, but
> > if it is possible no objection from me.
> 
> What uses these routines ? dev_pm_opp_of_register_em() ? I am not able
> to see that at least :(

Yep, it's not immediately obvious, but see how it sets the struct
em_data_callback to point at _get_power() where the actual energy
calculation is done. So strictly speaking _get_power() is what uses
these routines, but it goes in hand with dev_pm_opp_of_register_em() so
I guess the same reasoning applies.

> > Right but the EM is a description of the hardware, so it seemed fair
> > to assume this wouldn't change across the lifetime of the OS, similar
> > to the DT which we can't reload at run-time. Yes it can be a little odd
> > if you load/unload your driver module, but note that you generally can't
> > load two completely different drivers on a single system. You'll just
> > load the same one again and the hardware hasn't changed in the meantime,
> > so the previously loaded EM will still be correct.
> 
> Yeah, it will be the same driver but a different version of it, which
> may have updated the freq table. For me the EM is attached to the
> freq-table, and the freq-table is not available anymore after the
> driver is gone.
> 
> Anyway, I will leave that for you guys to decide :)

IIUC Lukasz is working on something that should allow changing the EM at
run-time, so hopefully it'll enable this use-case as well, but we'll see :)

WARNING: multiple messages have this Message-ID (diff)
From: Quentin Perret <qperret@google.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	Vincent Donnefort <vincent.donnefort@arm.com>,
	lukasz.luba@arm.com, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Fabio Estevam <festevam@gmail.com>,
	Kevin Hilman <khilman@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 0/8] cpufreq: Auto-register with energy model
Date: Wed, 11 Aug 2021 10:34:09 +0100	[thread overview]
Message-ID: <YROZkbMEMAeXMt1W@google.com> (raw)
In-Reply-To: <20210811091321.xtb776q4t6cwyanx@vireshk-i7>

On Wednesday 11 Aug 2021 at 14:43:21 (+0530), Viresh Kumar wrote:
> On 11-08-21, 09:37, Quentin Perret wrote:
> > On Wednesday 11 Aug 2021 at 10:48:59 (+0530), Viresh Kumar wrote:
> > > I had to use the pm-opp version, since almost everyone was using that.
> > > 
> > > On the other hand, there isn't a lot of OPP specific stuff in
> > > dev_pm_opp_of_register_em(). It just uses dev_pm_opp_get_opp_count(),
> > > that's all. This ended up in the OPP core, nothing else. Maybe we can
> > > now move it back to the EM core and name it differently ?
> > 
> > Well it also uses dev_pm_opp_find_freq_ceil() and
> > dev_pm_opp_get_voltage(), so not sure how easy it will be to move, but
> > if it is possible no objection from me.
> 
> What uses these routines ? dev_pm_opp_of_register_em() ? I am not able
> to see that at least :(

Yep, it's not immediately obvious, but see how it sets the struct
em_data_callback to point at _get_power() where the actual energy
calculation is done. So strictly speaking _get_power() is what uses
these routines, but it goes in hand with dev_pm_opp_of_register_em() so
I guess the same reasoning applies.

> > Right but the EM is a description of the hardware, so it seemed fair
> > to assume this wouldn't change across the lifetime of the OS, similar
> > to the DT which we can't reload at run-time. Yes it can be a little odd
> > if you load/unload your driver module, but note that you generally can't
> > load two completely different drivers on a single system. You'll just
> > load the same one again and the hardware hasn't changed in the meantime,
> > so the previously loaded EM will still be correct.
> 
> Yeah, it will be the same driver but a different version of it, which
> may have updated the freq table. For me the EM is attached to the
> freq-table, and the freq-table is not available anymore after the
> driver is gone.
> 
> Anyway, I will leave that for you guys to decide :)

IIUC Lukasz is working on something that should allow changing the EM at
run-time, so hopefully it'll enable this use-case as well, but we'll see :)

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Quentin Perret <qperret@google.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	Vincent Donnefort <vincent.donnefort@arm.com>,
	lukasz.luba@arm.com, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Fabio Estevam <festevam@gmail.com>,
	Kevin Hilman <khilman@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 0/8] cpufreq: Auto-register with energy model
Date: Wed, 11 Aug 2021 10:34:09 +0100	[thread overview]
Message-ID: <YROZkbMEMAeXMt1W@google.com> (raw)
In-Reply-To: <20210811091321.xtb776q4t6cwyanx@vireshk-i7>

On Wednesday 11 Aug 2021 at 14:43:21 (+0530), Viresh Kumar wrote:
> On 11-08-21, 09:37, Quentin Perret wrote:
> > On Wednesday 11 Aug 2021 at 10:48:59 (+0530), Viresh Kumar wrote:
> > > I had to use the pm-opp version, since almost everyone was using that.
> > > 
> > > On the other hand, there isn't a lot of OPP specific stuff in
> > > dev_pm_opp_of_register_em(). It just uses dev_pm_opp_get_opp_count(),
> > > that's all. This ended up in the OPP core, nothing else. Maybe we can
> > > now move it back to the EM core and name it differently ?
> > 
> > Well it also uses dev_pm_opp_find_freq_ceil() and
> > dev_pm_opp_get_voltage(), so not sure how easy it will be to move, but
> > if it is possible no objection from me.
> 
> What uses these routines ? dev_pm_opp_of_register_em() ? I am not able
> to see that at least :(

Yep, it's not immediately obvious, but see how it sets the struct
em_data_callback to point at _get_power() where the actual energy
calculation is done. So strictly speaking _get_power() is what uses
these routines, but it goes in hand with dev_pm_opp_of_register_em() so
I guess the same reasoning applies.

> > Right but the EM is a description of the hardware, so it seemed fair
> > to assume this wouldn't change across the lifetime of the OS, similar
> > to the DT which we can't reload at run-time. Yes it can be a little odd
> > if you load/unload your driver module, but note that you generally can't
> > load two completely different drivers on a single system. You'll just
> > load the same one again and the hardware hasn't changed in the meantime,
> > so the previously loaded EM will still be correct.
> 
> Yeah, it will be the same driver but a different version of it, which
> may have updated the freq table. For me the EM is attached to the
> freq-table, and the freq-table is not available anymore after the
> driver is gone.
> 
> Anyway, I will leave that for you guys to decide :)

IIUC Lukasz is working on something that should allow changing the EM at
run-time, so hopefully it'll enable this use-case as well, but we'll see :)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-08-11  9:34 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10  7:36 [PATCH 0/8] cpufreq: Auto-register with energy model Viresh Kumar
2021-08-10  7:36 ` Viresh Kumar
2021-08-10  7:36 ` Viresh Kumar
2021-08-10  7:36 ` [PATCH 1/8] cpufreq: Auto-register with energy model if asked Viresh Kumar
2021-08-10  9:36   ` Lukasz Luba
2021-08-10  9:38     ` Viresh Kumar
2021-08-10 15:33       ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 2/8] cpufreq: dt: Use auto-registration for energy model Viresh Kumar
2021-08-10 10:19   ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 3/8] cpufreq: imx6q: " Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10 10:20   ` Lukasz Luba
2021-08-10 10:20     ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 4/8] cpufreq: mediatek: " Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10 10:20   ` Lukasz Luba
2021-08-10 10:20     ` Lukasz Luba
2021-08-10 10:20     ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 5/8] cpufreq: omap: " Viresh Kumar
2021-08-10 10:24   ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 6/8] cpufreq: qcom-cpufreq-hw: " Viresh Kumar
2021-08-10 10:26   ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 7/8] cpufreq: scpi: " Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10 10:27   ` Lukasz Luba
2021-08-10 10:27     ` Lukasz Luba
2021-08-11  2:40   ` Sudeep Holla
2021-08-11  2:40     ` Sudeep Holla
2021-08-10  7:36 ` [PATCH 8/8] cpufreq: vexpress: " Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10 10:05   ` Lukasz Luba
2021-08-10 10:05     ` Lukasz Luba
2021-08-10 10:06     ` Viresh Kumar
2021-08-10 10:06       ` Viresh Kumar
2021-08-10 10:11       ` Lukasz Luba
2021-08-10 10:11         ` Lukasz Luba
2021-08-10 10:12         ` Viresh Kumar
2021-08-10 10:12           ` Viresh Kumar
2021-08-10 10:30   ` Lukasz Luba
2021-08-10 10:30     ` Lukasz Luba
2021-08-11  2:40   ` Sudeep Holla
2021-08-11  2:40     ` Sudeep Holla
2021-08-10  9:17 ` [PATCH 0/8] cpufreq: Auto-register with " Lukasz Luba
2021-08-10  9:17   ` Lukasz Luba
2021-08-10  9:17   ` Lukasz Luba
2021-08-10  9:27   ` Viresh Kumar
2021-08-10  9:27     ` Viresh Kumar
2021-08-10  9:27     ` Viresh Kumar
2021-08-10  9:35     ` Lukasz Luba
2021-08-10  9:35       ` Lukasz Luba
2021-08-10  9:35       ` Lukasz Luba
2021-08-10 12:35 ` Quentin Perret
2021-08-10 12:35   ` Quentin Perret
2021-08-10 12:35   ` Quentin Perret
2021-08-10 13:25   ` Lukasz Luba
2021-08-10 13:25     ` Lukasz Luba
2021-08-10 13:25     ` Lukasz Luba
2021-08-10 13:53     ` Quentin Perret
2021-08-10 13:53       ` Quentin Perret
2021-08-10 13:53       ` Quentin Perret
2021-08-11  5:18   ` Viresh Kumar
2021-08-11  5:18     ` Viresh Kumar
2021-08-11  5:18     ` Viresh Kumar
2021-08-11  5:34     ` Viresh Kumar
2021-08-11  5:34       ` Viresh Kumar
2021-08-11  5:34       ` Viresh Kumar
2021-08-11  9:48       ` Quentin Perret
2021-08-11  9:48         ` Quentin Perret
2021-08-11  9:48         ` Quentin Perret
2021-08-11  9:53         ` Viresh Kumar
2021-08-11  9:53           ` Viresh Kumar
2021-08-11  9:53           ` Viresh Kumar
2021-08-11 10:12           ` Quentin Perret
2021-08-11 10:12             ` Quentin Perret
2021-08-11 10:12             ` Quentin Perret
2021-08-11 10:14             ` Viresh Kumar
2021-08-11 10:14               ` Viresh Kumar
2021-08-11 10:14               ` Viresh Kumar
2021-08-11  8:37     ` Quentin Perret
2021-08-11  8:37       ` Quentin Perret
2021-08-11  8:37       ` Quentin Perret
2021-08-11  9:13       ` Viresh Kumar
2021-08-11  9:13         ` Viresh Kumar
2021-08-11  9:13         ` Viresh Kumar
2021-08-11  9:34         ` Quentin Perret [this message]
2021-08-11  9:34           ` Quentin Perret
2021-08-11  9:34           ` Quentin Perret
2021-08-11  9:36           ` Viresh Kumar
2021-08-11  9:36             ` Viresh Kumar
2021-08-11  9:36             ` Viresh Kumar

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=YROZkbMEMAeXMt1W@google.com \
    --to=qperret@google.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=cristian.marussi@arm.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=rjw@rjwysocki.net \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=vincent.donnefort@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.