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]
Date: Tue, 11 Jun 2024 11:29:09 +0100
From: Ionela Voinescu <ionela.voinescu@....com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: "liwei (JK)" <liwei728@...wei.com>,
	Beata Michalska <beata.michalska@....com>,
	Vanshidhar Konda <vanshikonda@...amperecomputing.com>,
	rafael@...nel.org, al.stone@...aro.org, ashwin.chaugule@...aro.org,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	liwei391@...wei.com, liaoyu15@...wei.com
Subject: Re: [PATCH] cpufreq/cppc: changing highest_perf to nominal_perf in
 cppc_cpufreq_cpu_init()

On Tuesday 11 Jun 2024 at 15:15:26 (+0530), Viresh Kumar wrote:
> On 11-06-24, 10:39, Ionela Voinescu wrote:
> > Makes sense! But maybe we should no longer update policy->cur to the
> > current/hardware frequency once a request comes through from a
> > governor, and we have a first actually requested value.
> 
> Hmm, not sure I understood that. When the request comes from governor,
> we only update policy->cur to the requested frequency and not the
> actual hardware frequency. And it is very much required. policy->cur

Yes, I mean we should only update policy->cur to a requested frequency
from a governor, after we start it (cpufreq_start_governor()).

But currently policy->cur gets updated to the .get() returned value in
multiple places, via cpufreq_verify_current_freq() (for example from 
show_cpuinfo_cur_freq() or cpufreq_get().

.get() is meant to return the current frequency of the hardware and that
can opportunistically be different from the last request made.

(+ we probably should force the first request from a governor to go
through to the driver to make sure the policy->cur obtained before,
via .get(), did not just happen to coincide with the governor request,
therefore making the request no longer go through to the driver: see
__cpufreq_driver_target)

> needs to be up to date all the times, it is an important part of the
> entire working of the cpufreq core..
> 

When you say that "policy->cur must be kept up to date at all times",
I suppose you mean that it should be kept up to date with any frequency
change requests not with any changes happening in hardware?

Thanks,
Ionela.

> -- 
> viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ