lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3176289.QFhGQadiPc@kreacher>
Date:   Wed, 19 Jun 2019 00:23:06 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     linux-pm@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Qais.Yousef@....com, mka@...omium.org, juri.lelli@...il.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 4/5] cpufreq: Register notifiers with the PM QoS framework

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.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ