Linux Power Management development
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Yue Hu <zbestahu@gmail.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Rafael Wysocki <rafael.j.wysocki@intel.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	huyue2@yulong.com
Subject: Re: [PATCH v3] cpufreq: Don't find governor for setpolicy drivers in cpufreq_init_policy()
Date: Mon, 29 Apr 2019 10:37:45 +0200	[thread overview]
Message-ID: <4262450.pcLMbF6iK3@kreacher> (raw)
In-Reply-To: <20190429155640.00004adb.zbestahu@gmail.com>

On Monday, April 29, 2019 9:56:40 AM CEST Yue Hu wrote:
> On Mon, 29 Apr 2019 09:37:27 +0200
> "Rafael J. Wysocki" <rafael@kernel.org> wrote:
> 
> > On Mon, Apr 29, 2019 at 9:24 AM Yue Hu <zbestahu@gmail.com> wrote:
> > >
> > > From: Yue Hu <huyue2@yulong.com>
> > >
> > > In cpufreq_init_policy() we will check if there's last_governor for target
> > > and setpolicy type. However last_governor is set only if has_target() is
> > > true in cpufreq_offline(). That means find last_governor for setpolicy
> > > type is pointless. Also new_policy.governor will not be used if ->setpolicy
> > > callback is set in cpufreq_set_policy().
> > >
> > > Moreover, there's duplicate ->setpolicy check in using default policy path.
> > > Let's add a new helper function to avoid it. Also update a little comment.
> > >
> > > Signed-off-by: Yue Hu <huyue2@yulong.com>  
> > 
> > Have you tested this with the intel_pstate driver (in the active mode)?
> 
> No, just tested for ARM. It should be common logic from code perspective.

But it is prudent to test changes on various configurations that may be affected.

Testing intel_pstate shouldn't be too difficult.

> Has any issue in this change?

Not in principle, but I need to check the details.

In general I'm a bit hesitant to take changes that haven't been tested properly.

Thanks,
Rafael




  reply	other threads:[~2019-04-29  8:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  7:24 [PATCH v3] cpufreq: Don't find governor for setpolicy drivers in cpufreq_init_policy() Yue Hu
2019-04-29  7:26 ` Viresh Kumar
2019-04-29  7:37 ` Rafael J. Wysocki
2019-04-29  7:56   ` Yue Hu
2019-04-29  8:37     ` Rafael J. Wysocki [this message]
2019-04-30  1:44       ` Yue Hu
2019-05-13  2:11       ` Yue Hu
2019-05-14 21:34         ` 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=4262450.pcLMbF6iK3@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=huyue2@yulong.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=zbestahu@gmail.com \
    /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