mirror of https://gitee.com/openkylin/linux.git
cpufreq: stats: Enable stats for fast-switch as well
Now that all the blockers are gone for enabling stats in fast-switching case, enable it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
4958b46efb
commit
96f60cddf7
|
@ -2072,8 +2072,12 @@ unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
|
||||||
target_freq = clamp_val(target_freq, policy->min, policy->max);
|
target_freq = clamp_val(target_freq, policy->min, policy->max);
|
||||||
freq = cpufreq_driver->fast_switch(policy, target_freq);
|
freq = cpufreq_driver->fast_switch(policy, target_freq);
|
||||||
|
|
||||||
|
if (!freq)
|
||||||
|
return 0;
|
||||||
|
|
||||||
arch_set_freq_scale(policy->related_cpus, freq,
|
arch_set_freq_scale(policy->related_cpus, freq,
|
||||||
policy->cpuinfo.max_freq);
|
policy->cpuinfo.max_freq);
|
||||||
|
cpufreq_stats_record_transition(policy, freq);
|
||||||
|
|
||||||
return freq;
|
return freq;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,9 +69,6 @@ static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf)
|
||||||
ssize_t len = 0;
|
ssize_t len = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (policy->fast_switch_enabled)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
for (i = 0; i < stats->state_num; i++) {
|
for (i = 0; i < stats->state_num; i++) {
|
||||||
if (pending) {
|
if (pending) {
|
||||||
if (i == stats->last_index)
|
if (i == stats->last_index)
|
||||||
|
@ -115,9 +112,6 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf)
|
||||||
ssize_t len = 0;
|
ssize_t len = 0;
|
||||||
int i, j, count;
|
int i, j, count;
|
||||||
|
|
||||||
if (policy->fast_switch_enabled)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
len += scnprintf(buf + len, PAGE_SIZE - len, " From : To\n");
|
len += scnprintf(buf + len, PAGE_SIZE - len, " From : To\n");
|
||||||
len += scnprintf(buf + len, PAGE_SIZE - len, " : ");
|
len += scnprintf(buf + len, PAGE_SIZE - len, " : ");
|
||||||
for (i = 0; i < stats->state_num; i++) {
|
for (i = 0; i < stats->state_num; i++) {
|
||||||
|
|
Loading…
Reference in New Issue