Message ID | 1665231397-115755-1-git-send-email-hongchengwen@oppo.com |
---|---|
State | New |
Headers | show |
Series | ANDROID: cpufreq: times: record fast switch frequency transitions | expand |
On 08-10-22, 20:16, hongchengwen wrote: > From: zhengding chen <chenzhengding@oppo.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@oppo.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) zhengding chen, You have sent your email to linux kernel lists, which don't have the same code base as Android. Please send your patch to the relevant lists/gerrit for Android. Thanks.
On 12-10-22, 06:17, 洪成文(Keven) wrote: > Viresh Kumar > > This is a modification based on the Linux kernel, not an Android version. > You may have misunderstood some fields in the commit message. Linux doesn't have cpufreq_times_record_transition().
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)