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: <1665231397-115755-1-git-send-email-hongchengwen@oppo.com>
Date:   Sat,  8 Oct 2022 20:16:37 +0800
From:   hongchengwen <hongchengwen@...o.com>
To:     hongchengwen@...o.com, rafael@...nel.org, viresh.kumar@...aro.org
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        zhengding chen <chenzhengding@...o.com>
Subject: [PATCH] ANDROID: cpufreq: times: record fast switch frequency transitions

From: zhengding chen <chenzhengding@...o.com>

cpufreq_times_record_transition() is not called when fast switch is
enabled, leading /proc/[pid]/time_in_state to attribute all time on a
cluster to a single frequency. To fix this, add a call to
cpufreq_times_record_transition() in the fast switch path.

Test: /proc/[pid]/time_in_state shows times for more than one freq per
cluster

Bug: 204726690
Signed-off-by: zhengding chen <chenzhengding@...o.com>
---
 drivers/cpufreq/cpufreq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 69b3d61..1caaf63 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2128,6 +2128,7 @@ unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
        arch_set_freq_scale(policy->related_cpus, freq,
                            policy->cpuinfo.max_freq);
        cpufreq_stats_record_transition(policy, freq);
+       cpufreq_times_record_transition(policy, freq);

        if (trace_cpu_frequency_enabled()) {
                for_each_cpu(cpu, policy->cpus)
--
2.7.4

________________________________
OPPO

本电子邮件及其附件含有OPPO公司的保密信息,仅限于邮件指明的收件人使用(包含个人及群组)。禁止任何人在未经授权的情况下以任何形式使用。如果您错收了本邮件,请立即以电子邮件通知发件人并删除本邮件及其附件。

This e-mail and its attachments contain confidential information from OPPO, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ