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

From: Andi Kleen
Date: Fri Jul 14 2017 - 11:54:02 EST

> > - if (cpuidle_not_available(drv, dev)) {
> > + if (cpuidle_not_available(drv, dev) || this_is_a_fast_idle) {
> > default_idle_call();
> > goto exit_idle;
> > }
> No, that's wrong. We want to fix the normal C state selection process to
> pick the right C state.
> The fast-idle criteria could cut off a whole bunch of available C
> states. We need to understand why our current C state pick is wrong and
> amend the algorithm to do better. Not just bolt something on the side.

Fast idle uses the same predictor as the current C state governor.

The only difference is that it uses a different threshold for C1.
Likely that's the cause. If it was using the same threshold the
decision would be the same.

The thresholds are coming either from the tables in intel idle,
or from ACPI (let's assume the first)

That means either: the intel idle C1 threshold on the system Aubrey
tested on is too high, or the fast idle threshold is too low.

But that would be only true for the workload he tested.
It may well be that it's not that great for another.

The numbers in the standard intel_idle are reasonably tested
with many workloads, so I guess it would be safer to pick that one.
Unless someone wants to revisit these tables.