alt_intercepts = 2 * idx_intercept_sum > cpu_data->total - idx_hit_sum;
alt_recent = idx_recent_sum > NR_RECENT / 2;
if (alt_recent || alt_intercepts) {
- s64 last_enabled_span_ns = duration_ns;
- int last_enabled_idx = idx;
+ s64 first_suitable_span_ns = duration_ns;
+ int first_suitable_idx = idx;
/*
* Look for the deepest idle state whose target residency had
* disabled, so take the first enabled
* deeper state with suitable time span.
*/
- idx = last_enabled_idx;
- duration_ns = last_enabled_span_ns;
+ idx = first_suitable_idx;
+ duration_ns = first_suitable_span_ns;
}
break;
}
* alternative candidate state has been found,
* it may still turn out to be a better choice.
*/
- if (last_enabled_idx != idx)
+ if (first_suitable_idx != idx)
continue;
break;
}
- last_enabled_span_ns = span_ns;
- last_enabled_idx = i;
+ first_suitable_span_ns = span_ns;
+ first_suitable_idx = i;
}
}