linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Fabio Baltieri <fabio.baltieri@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	linaro-dev@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: governors: implement generic policy_is_shared
Date: Thu, 31 Jan 2013 14:28:56 +0530	[thread overview]
Message-ID: <CAOh2x==1ru3bddHnJOge=1rbpc6xwzKV5F5isJhAgwX_R=2TCw@mail.gmail.com> (raw)
In-Reply-To: <20130131085555.GB30667@balto.lan>

On Thu, Jan 31, 2013 at 2:25 PM, Fabio Baltieri
<fabio.baltieri@linaro.org> wrote:
> On Thu, Jan 31, 2013 at 02:01:27PM +0530, Viresh Kumar wrote:
>> On 31 January 2013 13:44, Fabio Baltieri <fabio.baltieri@linaro.org> wrote:
>> > Implement a generic helper function policy_is_shared() to replace the
>> > current dbs_sw_coordinated_cpus() at cpufreq level, so that it can be
>> > used by code other than cpufreq governors.
>> >
>> > Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
>> > Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
>> > ---
>> >  drivers/cpufreq/cpufreq_conservative.c | 2 +-
>> >  drivers/cpufreq/cpufreq_governor.c     | 8 --------
>> >  drivers/cpufreq/cpufreq_governor.h     | 1 -
>> >  drivers/cpufreq/cpufreq_ondemand.c     | 2 +-
>> >  include/linux/cpufreq.h                | 5 +++++
>>
>> Great,
>>
>> But, you missed few places:
>>
>> drivers/cpufreq/acpi-cpufreq.c:        if (bios_with_sw_any_bug &&
>> cpumask_weight(policy->cpus) == 1) {
>> drivers/cpufreq/cpufreq_stats.c:       if (policy &&
>> (cpumask_weight(policy->cpus) == 1)) {
>
> This doesn't look like the same thing to me!  Isn't this check here just
> to trigger during init (exit) on the first (last) cpu?  How would you
> replace it?

I don't think i am wrong, but i can be :)

So, i would replace these as:
drivers/cpufreq/acpi-cpufreq.c:        if (bios_with_sw_any_bug &&
cpumask_weight(policy->cpus) == 1) {
AS
drivers/cpufreq/acpi-cpufreq.c:        if (bios_with_sw_any_bug &&
!policy_is_shared(policy)) {

similarly for the other one too. The whole point is about checking if policy
is managing just one cpu or multiple cpus.

  reply	other threads:[~2013-01-31  8:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  8:14 [PATCH] cpufreq: governors: implement generic policy_is_shared Fabio Baltieri
2013-01-31  8:31 ` Viresh Kumar
2013-01-31  8:55   ` Fabio Baltieri
2013-01-31  8:58     ` Viresh Kumar [this message]
     [not found]       ` <CAOh2x==1ru3bddHnJOge=1rbpc6xwzKV5F5isJhAgwX_R=2TCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-31  9:44         ` [PATCH v2] " Fabio Baltieri
2013-01-31  9:53           ` 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='CAOh2x==1ru3bddHnJOge=1rbpc6xwzKV5F5isJhAgwX_R=2TCw@mail.gmail.com' \
    --to=viresh.kumar@linaro.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=fabio.baltieri@linaro.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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).