sched/walt: Update cpufreq_driver_fast_switch() invocation

cpu_frequency trace events are coming twice when a frequency
switch happens. This is due to commit 08d8c65e84 ("cpufreq:
Move traces and update to policy->cur to cpufreq core") in the
upstream which takes care of cpu_frequency trace event and
updates to policy->cur when cpufreq_driver_fast_switch() is
called.

So remove the redundant code from waltgov cpufreq governor to
avoid duplicate cpu_frequency trave events.

Change-Id: I490e766abcc09ed2a580e5f09930a54d76367999
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2021-02-02 12:02:59 +05:30 committed by Rishabh Bhatnagar
parent f3af9072ef
commit 6cab0b20dd

View File

@ -180,22 +180,12 @@ static void waltgov_fast_switch(struct waltgov_policy *wg_policy, u64 time,
unsigned int next_freq)
{
struct cpufreq_policy *policy = wg_policy->policy;
unsigned int cpu;
if (!waltgov_update_next_freq(wg_policy, time, next_freq))
return;
waltgov_track_cycles(wg_policy, wg_policy->policy->cur, time);
next_freq = cpufreq_driver_fast_switch(policy, next_freq);
if (!next_freq)
return;
policy->cur = next_freq;
if (trace_cpu_frequency_enabled()) {
for_each_cpu(cpu, policy->cpus)
trace_cpu_frequency(next_freq, cpu);
}
cpufreq_driver_fast_switch(policy, next_freq);
}
static void waltgov_deferred_update(struct waltgov_policy *wg_policy, u64 time,