@@ -349,13 +349,13 @@
}
/*
- * If the sum of the intercepts metric for all of the idle states
- * shallower than the current candidate one (idx) is greater than the
+ * If the sum of the intercepts and hits metric for all of the idle
+ * states below the current candidate one (idx) is greater than the
* sum of the intercepts and hits metrics for the candidate state and
* all of the deeper states, a shallower idle state is likely to be a
* better choice.
*/
- if (2 * idx_intercept_sum > cpu_data->total - idx_hit_sum) {
+ if (2 * (idx_intercept_sum + idx_hit_sum) > cpu_data->total) {
int first_suitable_idx = idx;
/*