linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: intel_pstate: Synchronize sysfs limits
Date: Mon, 14 Nov 2016 14:07:37 -0800	[thread overview]
Message-ID: <1479161257.6544.33.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0j8CQk8tbxsCA_R0M2RJ4u58UexQkb7Waq4qRYQdRcw1A@mail.gmail.com>

On Mon, 2016-11-14 at 02:04 +0100, Rafael J. Wysocki wrote:
> On Sat, Nov 12, 2016 at 1:11 AM, Srinivas Pandruvada
> 
[...]
> +       get_online_cpus();
> > +       for_each_online_cpu(cpu) {
> > +               if (all_cpu_data[cpu])
> > +                       cpufreq_update_policy(cpu);
> 
> cpufreq_update_policy() calls cpufreq_cpu_get() to get the policy
> anyway which does the requisite policy existence check (although it
> is
> a bit racy now, but that's a bug in there that we should not have to
> work around here), so it should be sufficient to do this
> for_each_possible_cpu() without additional locking.
> 
I will change in the next patch set.

> > 
[...]

> > +       cpufreq_register_notifier(&intel_pstate_cpufreq_notifier_bl
> > ock,
> > +                                 CPUFREQ_POLICY_NOTIFIER);
> > +
> 
> cpufreq_set_policy() will call our ->verify() and ->set_policy()
> things, so why do we need the notifier?
> 
I was simply replicating what is done for _PPC notifiers. But we can do
in verify() callback here. In the next patch, I will change this.

Thanks,
Srinivas


  reply	other threads:[~2016-11-14 22:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12  0:11 [PATCH] cpufreq: intel_pstate: Synchronize sysfs limits Srinivas Pandruvada
2016-11-14  1:04 ` Rafael J. Wysocki
2016-11-14 22:07   ` Srinivas Pandruvada [this message]
2016-11-14 22:11     ` Rafael J. Wysocki
2016-11-14 22:46       ` 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=1479161257.6544.33.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /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).