From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
Qais.Yousef@arm.com, mka@chromium.org, juri.lelli@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 4/5] cpufreq: Register notifiers with the PM QoS framework
Date: Wed, 19 Jun 2019 00:23:06 +0200 [thread overview]
Message-ID: <3176289.QFhGQadiPc@kreacher> (raw)
In-Reply-To: <20190618112522.4odrysf7wmxgjlb2@vireshk-i7>
On Tuesday, June 18, 2019 1:25:22 PM CEST Viresh Kumar wrote:
> On 18-06-19, 01:26, Rafael J. Wysocki wrote:
> > On Monday, June 10, 2019 12:51:35 PM CEST Viresh Kumar wrote:
> > > +static int cpufreq_notifier_min(struct notifier_block *nb, unsigned long freq,
> > > + void *data)
> > > +{
> > > + struct cpufreq_policy *policy = container_of(nb, struct cpufreq_policy, nb_min);
> > > +
> > > + return cpufreq_update_freq(policy);
> > > +}
> > > +
> > > +static int cpufreq_notifier_max(struct notifier_block *nb, unsigned long freq,
> > > + void *data)
> > > +{
> > > + struct cpufreq_policy *policy = container_of(nb, struct cpufreq_policy, nb_max);
> > > +
> > > + return cpufreq_update_freq(policy);
> > > +}
> >
> > This is a bit convoluted.
> >
> > Two different notifiers are registered basically for the same thing.
> >
> > Any chance to use just one?
>
> The way QoS is designed, it handles one value only at a time and we need two,
> min/max. I thought a lot about it earlier and this is what I came up with :(
>
> You have any suggestions here ?
In patch [3/5] you could point notifiers for both min and max freq to the same
notifier head. Both of your notifiers end up calling cpufreq_update_policy()
anyway.
next prev parent reply other threads:[~2019-06-18 22:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 10:51 [PATCH V3 0/5] cpufreq: Use QoS layer to manage freq-constraints Viresh Kumar
2019-06-10 10:51 ` [PATCH V3 1/5] PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier() Viresh Kumar
2019-06-11 23:45 ` Matthias Kaehlcke
2019-06-17 9:23 ` Ulf Hansson
2019-06-17 22:52 ` Rafael J. Wysocki
2019-06-10 10:51 ` [PATCH V3 2/5] PM / QOS: Pass request type to dev_pm_qos_read_value() Viresh Kumar
2019-06-12 0:08 ` Matthias Kaehlcke
2019-06-17 9:23 ` Ulf Hansson
2019-06-17 23:14 ` Rafael J. Wysocki
2019-06-10 10:51 ` [PATCH V3 3/5] PM / QoS: Add support for MIN/MAX frequency constraints Viresh Kumar
2019-06-13 0:04 ` Matthias Kaehlcke
2019-06-17 9:23 ` Ulf Hansson
2019-06-10 10:51 ` [PATCH V3 4/5] cpufreq: Register notifiers with the PM QoS framework Viresh Kumar
2019-06-14 16:46 ` Matthias Kaehlcke
2019-06-17 3:02 ` Viresh Kumar
2019-06-17 9:23 ` Ulf Hansson
2019-06-17 23:26 ` Rafael J. Wysocki
2019-06-18 11:25 ` Viresh Kumar
2019-06-18 22:23 ` Rafael J. Wysocki [this message]
2019-06-19 6:39 ` Viresh Kumar
2019-06-19 9:15 ` Rafael J. Wysocki
2019-06-17 23:37 ` Rafael J. Wysocki
2019-06-18 11:34 ` Viresh Kumar
2019-06-10 10:51 ` [PATCH V3 5/5] cpufreq: Add QoS requests for userspace constraints Viresh Kumar
2019-06-14 17:14 ` Matthias Kaehlcke
2019-06-17 3:07 ` Viresh Kumar
2019-06-17 9:23 ` Ulf Hansson
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=3176289.QFhGQadiPc@kreacher \
--to=rjw@rjwysocki.net \
--cc=Qais.Yousef@arm.com \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mka@chromium.org \
--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