ANDROID: vh: move the build_perf_domains rvh to sched_is_eas_possible()
Since the commit 8f833c82cdab("sched/topology: Change behaviour of the 'sched_energy_aware' sysctl, based on the platform")
has add more check in the sched_is_eas_possible(), and it add check in the sched_energy_aware_handler,
so it is not enough to put the previous rvh only in the build_perf_domains().
Move it to the sched_is_eas_possible() to allow vendors building its own eas check.
Bug: 414251487
Change-Id: I049ef8faebacd306c69a485e2720e051e1af19f9
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
This commit is contained in:
committed by
Treehugger Robot
parent
52dba7cb94
commit
d761f8d843
@@ -222,6 +222,11 @@ static bool sched_is_eas_possible(const struct cpumask *cpu_mask)
|
||||
struct cpufreq_policy *policy;
|
||||
struct cpufreq_governor *gov;
|
||||
int i;
|
||||
bool eas_check = false;
|
||||
|
||||
trace_android_rvh_build_perf_domains(&eas_check);
|
||||
if (eas_check)
|
||||
return true;
|
||||
|
||||
/* EAS is enabled for asymmetric CPU capacity topologies. */
|
||||
for_each_cpu(i, cpu_mask) {
|
||||
@@ -432,12 +437,11 @@ static bool build_perf_domains(const struct cpumask *cpu_map)
|
||||
struct perf_domain *pd = NULL, *tmp;
|
||||
int cpu = cpumask_first(cpu_map);
|
||||
struct root_domain *rd = cpu_rq(cpu)->rd;
|
||||
bool eas_check = false;
|
||||
|
||||
if (!sysctl_sched_energy_aware)
|
||||
goto free;
|
||||
trace_android_rvh_build_perf_domains(&eas_check);
|
||||
if (!sched_is_eas_possible(cpu_map) && !eas_check)
|
||||
|
||||
if (!sched_is_eas_possible(cpu_map))
|
||||
goto free;
|
||||
|
||||
for_each_cpu(i, cpu_map) {
|
||||
|
||||
Reference in New Issue
Block a user