From: "Doug Smythies" <dsmythies@telus.net>
To: "'Quentin Perret'" <qperret@google.com>
Cc: juri.lelli@redhat.com, kernel-team@android.com,
vincent.guittot@linaro.org, arnd@arndb.de,
linux-pm@vger.kernel.org, peterz@infradead.org,
adharmap@codeaurora.org, rafael@kernel.org, rjw@rjwysocki.net,
linux-kernel@vger.kernel.org, viresh.kumar@linaro.org,
mingo@redhat.com, paulus@samba.org,
linuxppc-dev@lists.ozlabs.org, tkjos@google.com
Subject: RE: [PATCH v2 0/2] cpufreq: Specify the default governor on command line
Date: Tue, 23 Jun 2020 10:54:33 -0700 [thread overview]
Message-ID: <002201d64987$5dc93b90$195bb2b0$@net> (raw)
In-Reply-To: <20200623142138.209513-1-qperret@google.com>
On 2020.06.23 07:22 Quentin Perret wrote:
>
> This series enables users of prebuilt kernels (e.g. distro kernels) to
> specify their CPUfreq governor of choice using the kernel command line,
> instead of having to wait for the system to fully boot to userspace to
> switch using the sysfs interface. This is helpful for 2 reasons:
> 1. users get to choose the governor that runs during the actual boot;
> 2. it simplifies the userspace boot procedure a bit (one less thing to
> worry about).
>
> To enable this, the first patch moves all governor init calls to
> core_initcall, to make sure they are registered by the time the drivers
> probe. This should be relatively low impact as registering a governor
> is a simple procedure (it gets added to a llist), and all governors
> already load at core_initcall anyway when they're set as the default
> in Kconfig. This also allows to clean-up the governors' init/exit code,
> and reduces boilerplate.
>
> The second patch introduces the new command line parameter, inspired by
> its cpuidle counterpart. More details can be found in the respective
> patch headers.
>
> Changes in v2:
> - added Viresh's ack to patch 01
> - moved the assignment of 'default_governor' in patch 02 to the governor
> registration path instead of the driver registration (Viresh)
>
> Thanks,
> Quentin
>
> Quentin Perret (2):
> cpufreq: Register governors at core_initcall
> cpufreq: Specify default governor on command line
>
> .../admin-guide/kernel-parameters.txt | 5 ++++
> Documentation/admin-guide/pm/cpufreq.rst | 6 ++---
> .../platforms/cell/cpufreq_spudemand.c | 26 ++-----------------
> drivers/cpufreq/cpufreq.c | 23 ++++++++++++----
> drivers/cpufreq/cpufreq_conservative.c | 22 ++++------------
> drivers/cpufreq/cpufreq_ondemand.c | 24 +++++------------
> drivers/cpufreq/cpufreq_performance.c | 14 ++--------
> drivers/cpufreq/cpufreq_powersave.c | 18 +++----------
> drivers/cpufreq/cpufreq_userspace.c | 18 +++----------
> include/linux/cpufreq.h | 14 ++++++++++
> kernel/sched/cpufreq_schedutil.c | 6 +----
> 11 files changed, 62 insertions(+), 114 deletions(-)
>
> --
> 2.27.0.111.gc72c7da667-goog
Hi Quentin,
Because I am lazy and sometimes do not want to recompile
the distro source, I have a need/desire for this.
Tested these two grub command lines:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 consoleblank=300 intel_pstate=disable cpufreq.default_governor=schedutil cpuidle_sysfs_switch cpuidle.governor=teo"
And
#GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 consoleblank=450 intel_pstate=passive cpufreq.default_governor=schedutil cpuidle_sysfs_switch cpuidle.governor=teo"
And all worked as expected. I use Ubuntu as my distro, and also had to disable a startup script that switches to "ondemand", or similar, after 1 minute.
As a side note (separate subject, but is one reason I tried it):
My i5-9600K based computer seems to hit a power limit during boot approximately 3 seconds after kernel selection on grub.
This had no effect on that issue (even when selecting powersave governor).
... Doug
next prev parent reply other threads:[~2020-06-23 22:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 14:21 [PATCH v2 0/2] cpufreq: Specify the default governor on command line Quentin Perret
2020-06-23 14:21 ` [PATCH v2 1/2] cpufreq: Register governors at core_initcall Quentin Perret
2020-06-23 14:21 ` [PATCH v2 2/2] cpufreq: Specify default governor on command line Quentin Perret
2020-06-24 5:50 ` Viresh Kumar
2020-06-24 12:51 ` Rafael J. Wysocki
2020-06-24 15:32 ` Quentin Perret
2020-06-25 8:50 ` Viresh Kumar
2020-06-25 10:52 ` Rafael J. Wysocki
2020-06-25 11:36 ` Viresh Kumar
2020-06-25 11:44 ` Rafael J. Wysocki
2020-06-25 11:53 ` Quentin Perret
2020-06-25 13:28 ` Rafael J. Wysocki
2020-06-25 13:49 ` Quentin Perret
2020-06-25 14:08 ` Rafael J. Wysocki
2020-06-26 2:53 ` Viresh Kumar
2020-06-26 8:09 ` Quentin Perret
2020-06-23 17:54 ` Doug Smythies [this message]
2020-06-23 18:04 ` [PATCH v2 0/2] cpufreq: Specify the " Quentin Perret
2020-06-24 0:07 ` Doug Smythies
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='002201d64987$5dc93b90$195bb2b0$@net' \
--to=dsmythies@telus.net \
--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 \
--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 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).