From: Viresh Kumar <viresh.kumar@linaro.org>
To: Quentin Perret <qperret@google.com>
Cc: juri.lelli@redhat.com, kernel-team@android.com,
vincent.guittot@linaro.org, arnd@arndb.de, rafael@kernel.org,
peterz@infradead.org, adharmap@codeaurora.org,
linux-pm@vger.kernel.org, rjw@rjwysocki.net,
linux-kernel@vger.kernel.org, mingo@redhat.com, paulus@samba.org,
linuxppc-dev@lists.ozlabs.org, tkjos@google.com
Subject: Re: [PATCH 2/2] cpufreq: Specify default governor on command line
Date: Tue, 16 Jun 2020 14:57:59 +0530 [thread overview]
Message-ID: <20200616092759.rjnk3lef4tedfust@vireshk-i7> (raw)
In-Reply-To: <20200616083107.GA122049@google.com>
On 16-06-20, 09:31, Quentin Perret wrote:
> Right, so the reason I avoided cpufreq_core_init() was because it is
> called at core_initcall() time, which means I can't really assume the
> governors have been loaded by that time. By waiting for the driver to
> probe before detecting the default gov, we get that nice ordering. But
> yes, it feels odd to have it here :/
>
> Thinking about it more, the natural fit for this would rather be the
> register/unregister path for governors directly. If that sounds good to
> you (?) I'll try to move it there in v2.
There is another problem here which we need to look at. Any governor
which is built as a module and isn't currently used, should be allowed
to unload. And this needs to be tested by you as well, should be easy
enough.
With the current implementation, you take a reference to the default
governor when the driver is registered and drop it only when the
driver goes away. Which means we won't be able to unload the module of
the governor even if it isn't used. Which is wrong. The solution I
proposed had the same issue as well.
You need to figure out a way where we don't need to keep holding the
module hostage even when it isn't used. I see two ways at least for
the same:
- Do that from the existing place: cpufreq_init_policy().
- And I think this can be done from governor-register/unregister as
well.
Second one sounds good, if it is feasible to do that.
--
viresh
next prev parent reply other threads:[~2020-06-16 9:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 16:55 [PATCH 0/2] cpufreq: Specify the default governor on command line Quentin Perret
2020-06-15 16:55 ` [PATCH 1/2] cpufreq: Register governors at core_initcall Quentin Perret
2020-06-16 4:28 ` Viresh Kumar
2020-06-16 8:31 ` Quentin Perret
2020-06-15 16:55 ` [PATCH 2/2] cpufreq: Specify default governor on command line Quentin Perret
2020-06-15 17:41 ` Quentin Perret
2020-06-16 4:31 ` Viresh Kumar
2020-06-16 8:31 ` Quentin Perret
2020-06-16 9:27 ` Viresh Kumar [this message]
2020-06-16 9:48 ` Quentin Perret
2020-06-16 9:54 ` Viresh Kumar
2020-06-16 9:56 ` Quentin Perret
2020-06-20 14:36 ` [cpufreq] d83f959b5e: aim7.jobs-per-min -30.2% regression kernel test robot
2020-06-22 0:54 ` [cpufreq] d83f959b5e: kmsg.cpufreq:cpufreq_online:Failed_to_initialize_policy_for_cpu:#(-#) kernel test robot
2020-06-23 9:25 ` Quentin Perret
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=20200616092759.rjnk3lef4tedfust@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=adharmap@codeaurora.org \
--cc=arnd@arndb.de \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=qperret@google.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tkjos@google.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