From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Jason Baron <jbaron@akamai.com>
Cc: "viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Dirk Brandewie <dirk.j.brandewie@intel.com>,
"dirk.brandewie@gmail.com" <dirk.brandewie@gmail.com>
Subject: Re: [PATCH] cpufreq: Apply default governor for setpolicy drivers
Date: Thu, 19 Dec 2013 00:33:26 +0100 [thread overview]
Message-ID: <2651749.Dr3egRT25J@vostro.rjw.lan> (raw)
In-Reply-To: <52B21508.3000303@akamai.com>
On Wednesday, December 18, 2013 04:35:04 PM Jason Baron wrote:
> On 12/18/2013 04:38 PM, Rafael J. Wysocki wrote:
> > On Wednesday, December 18, 2013 08:31:02 PM Jason Baron wrote:
> >> When configuring a default governor (via CONFIG_CPU_FREQ_DEFAULT_*) with the
> >> 'intel_pstate' driver, I found that the default is not honored. For example,
> >> configure 'CONFIG_CPU_FREQ_GOV_PERFORMANCE', and then do:
> > intel_pstate doesn't use any cpufreq governors, so all of this is pointless
> > for that particular driver anyway.
> >
> > Thanks!
> >
>
> Ok, but if I look at 'intel_pstate', I see a 'set_policy' call that does different
> things if the policy is 'performance' vs. 'powersave'. Same for the 'longrun'
> driver. So yes, they don't use the 'governors', but changing the governors
> at runtime does appear to change change how they behave.
OK, so you want the initial policy to be set in accordance with the
CONFIG_CPU_FREQ_DEFAULT_* setting. That makes sense, although it is not
immediately clear from the patch changelog.
That said the change in the patch looks kind of overly complicated.
What about adding something like this instead?
+ if (cpufreq_driver->setpolicy) {
+ unsigned int ret;
+
+ /* Use the default policyt if it is valid. */
+ if (!cpufreq_parse_governor(policy->governor->name, &ret, NULL))
+ new_policy.policy = ret;
+ }
Rafael
next prev parent reply other threads:[~2013-12-18 23:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 20:31 [PATCH] cpufreq: Apply default governor for setpolicy drivers Jason Baron
2013-12-18 21:38 ` Rafael J. Wysocki
2013-12-18 21:35 ` Jason Baron
2013-12-18 23:33 ` Rafael J. Wysocki [this message]
2013-12-19 3:51 ` Jason Baron
2013-12-19 13:18 ` Rafael J. Wysocki
2013-12-19 5:27 ` Viresh Kumar
2013-12-19 13:16 ` Rafael J. Wysocki
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=2651749.Dr3egRT25J@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=cpufreq@vger.kernel.org \
--cc=dirk.brandewie@gmail.com \
--cc=dirk.j.brandewie@intel.com \
--cc=jbaron@akamai.com \
--cc=linux-pm@vger.kernel.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