===================================================================
@@ -217,6 +217,7 @@ static bool sched_is_eas_possible(const
bool any_asym_capacity = false;
struct cpufreq_policy *policy;
struct cpufreq_governor *gov;
+ bool cpufreq_ok;
int i;
/* EAS is enabled for asymmetric CPU capacity topologies. */
@@ -251,7 +252,7 @@ static bool sched_is_eas_possible(const
return false;
}
- /* Do not attempt EAS if schedutil is not being used. */
+ /* Do not attempt EAS if cpufreq is not configured adequately */
for_each_cpu(i, cpu_mask) {
policy = cpufreq_cpu_get(i);
if (!policy) {
@@ -261,11 +262,14 @@ static bool sched_is_eas_possible(const
}
return false;
}
+ /* Require schedutil or a "setpolicy" driver */
gov = policy->governor;
+ cpufreq_ok = gov == &schedutil_gov ||
+ (!gov && policy->policy != CPUFREQ_POLICY_UNKNOWN);
cpufreq_cpu_put(policy);
- if (gov != &schedutil_gov) {
+ if (!cpufreq_ok) {
if (sched_debug()) {
- pr_info("rd %*pbl: Checking EAS, schedutil is mandatory\n",
+ pr_info("rd %*pbl: Checking EAS, unsuitable cpufreq governor\n",
cpumask_pr_args(cpu_mask));
}
return false;