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-next>] [day] [month] [year] [list]
Message-ID: <tencent_D6C4728C5C687C042BA7C156B0F3ECF7AE05@qq.com>
Date: Wed,  9 Apr 2025 17:49:48 +0800
From: Yaxiong Tian <iambestgod@...com>
To: rafael@...nel.org,
	viresh.kumar@...aro.org,
	Pierre.Gondois@....com
Cc: linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Yaxiong Tian <tianyaxiong@...inos.cn>
Subject: [PATCH 0/2]  Fix and optimize some comments in the CPCC EM model 

From: Yaxiong Tian <tianyaxiong@...inos.cn>

Commit <740fcdc2c20ec> ("cpufreq: CPPC: Register EM based on efficiency 
class information") introduced a very good feature. However, since commit
<1b600da510735a> ("PM: EM: Optimize em_cpu_energy() and remove division"), 
the energy calculation formula in the EM model has changed. Therefore, some
comments need to be updated and corrected to avoid misunderstandings.

I carefully analyzed the code theoretically and found that the new energy 
calculation formula doesn't affect the current code - in fact, it has brought 
some improvements. For example, consider four efficiency classes (1, 2, 3, 4). 
Under the old logic, there were cases where tasks would be scheduled to class 4 
CPUs instead of class 3 CPUs. This happened because the old energy calculation 
formula divided by CPU capacity, and since class 3 CPUs have lower capacity than 
class 4, it sometimes went against the original intention.

Considering that the comments about CPPC_EM_COST_GAP might be confusing, I've 
added some analytical comments before CPPC_EM_COST_GAP in the latest code to 
help other developers better understand. 

Of course, this is just my personal understanding - please point out if 
there are any mistakes.

Yaxiong Tian (2):
  cpufreq: cppc: Update and opt comment for cost calculation method
  cpufreq: cppc: Add comments for CPPC_EM_COST_GAP calculation

 drivers/cpufreq/cppc_cpufreq.c | 44 ++++++++++++++++++++++++++++++----
 1 file changed, 40 insertions(+), 4 deletions(-)

-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ