Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods

From: Peter Zijlstra
Date: Mon Jul 17 2017 - 05:21:30 EST


On Fri, Jul 14, 2017 at 09:03:14AM -0700, Andi Kleen wrote:
> fast idle doesn't have an upper bound.
>
> If the prediction exceeds the fast idle threshold any C state can be used.
>
> It's just another state (fast C1), but right now it has an own threshold
> which may be different from standard C1.

Given it uses the same estimate we end up with:

select_c_state(idle_est)
{
if (idle_est < fast_threshold)
return C1;

if (idle_est < C1_threshold)
return C1;
if (idle_est < C2_threshold)
return C2;
/* ... */

return C6
}

Now, unless you're mister Turnbull, C2 will never get selected when
fast_threshold > C2_threshold.

Which is wrong. If you want to effectively scale the selection of C1,
why not also change the C2 and further criteria.