From: Viresh Kumar <viresh.kumar@linaro.org>
To: Lukasz Luba <lukasz.luba@arm.com>
Cc: Andy Gross <agross@kernel.org>,
Rafael Wysocki <rjw@rjwysocki.net>,
Vincent Donnefort <vincent.donnefort@arm.com>,
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: Tue, 10 Aug 2021 14:57:05 +0530 [thread overview]
Message-ID: <20210810092705.ctf43hwhzdepmcrv@vireshk-i7> (raw)
In-Reply-To: <6449a61f-a5fc-0b81-65b2-7bf77b8a71aa@arm.com>
On 10-08-21, 10:17, Lukasz Luba wrote:
> Hi Viresh,
>
> I like the idea, only small comments here in the cover letter.
>
> On 8/10/21 8:36 AM, Viresh Kumar wrote:
> > Provide a cpufreq driver flag so drivers can ask the cpufreq core to register
> > with the EM core on their behalf. This allows us to get rid of duplicated code
> > in the drivers and fix the unregistration part as well, which none of the
> > drivers have done until now.
>
> The EM is never freed for CPUs by design. The unregister function was
> introduced for devfreq devices.
I see. So if a cpufreq driver unregisters and registers again, it will
be required to use the entries created by the registration itself,
right ? Technically speaking, it is better to unregister and free any
related resources and parse everything again.
Lets say, just for fun, I want to test two copies of a cpufreq driver
(providing different set of freq-tables). I build both of them as
modules, insert the first version, remove it, insert the second one.
Ideally, this should just work as expected. But I don't think it will
in this case as you never parse the EM stuff again.
Again, since the routine is there already, I think it is better/fine
to just use it.
> > This would also make the registration with EM core to happen only after policy
> > is fully initialized, and the EM core can do other stuff from in there, like
> > marking frequencies as inefficient (WIP). Though this patchset is useful without
> > that work being done and should be merged nevertheless.
> >
> > This doesn't update scmi cpufreq driver for now as it is a special case and need
> > to be handled differently. Though we can make it work with this if required.
>
> The scmi cpufreq driver uses direct EM API, which provides flexibility
> and should stay as is.
Right, so I left it as is for now.
--
viresh
next prev parent reply other threads:[~2021-08-10 9:27 UTC|newest]
Thread overview: 19+ 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 ` [PATCH 6/8] cpufreq: qcom-cpufreq-hw: Use auto-registration for " Viresh Kumar
2021-08-10 10:26 ` Lukasz Luba
2021-08-10 9:17 ` [PATCH 0/8] cpufreq: Auto-register with " Lukasz Luba
2021-08-10 9:27 ` Viresh Kumar [this message]
2021-08-10 9:35 ` Lukasz Luba
2021-08-10 12:35 ` Quentin Perret
2021-08-10 13:25 ` Lukasz Luba
2021-08-10 13:53 ` Quentin Perret
2021-08-11 5:18 ` Viresh Kumar
2021-08-11 5:34 ` Viresh Kumar
2021-08-11 9:48 ` Quentin Perret
2021-08-11 9:53 ` Viresh Kumar
2021-08-11 10:12 ` Quentin Perret
2021-08-11 10:14 ` Viresh Kumar
2021-08-11 8:37 ` Quentin Perret
2021-08-11 9:13 ` Viresh Kumar
2021-08-11 9:34 ` Quentin Perret
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=20210810092705.ctf43hwhzdepmcrv@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--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 \
/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).