On Thu, Oct 15, 2020 at 8:34 PM Mel Gorman <mgor...@techsingularity.net> wrote: > > > Yes, it's well hidden but it's there. If the profile is made custom, then > > the p-states can be selected and "custom" default enables C6 but not C3 > > (there is a note saying that it's not recommended for that CPU). If I > > then switch it back to the normal profile, the c-states are not restored > > so this is a one-way trip even if you disable the c-state in custom, > > reboot, switch back, reboot. Same if the machine is reset to "optimal > > default settings". Yey for BIOS developers. > > > > This means I have a limited number of attempts to do something about > > this. 2 machines can no longer reproduce the problem reliably. > > > > Turns out I didn't even have that. On another machine (same model, > same cpu, different BIOS that cannot be updated), enabling the C6 state > still did not enable it on boot and dmesg complained about CST not being > usable. This is weird because one would expect that if CST was unusable > that it would be the same as use_acpi == false. > > This could potentially be if the ACPI tables are unsuitable due to bad > bad FFH information for a lower c-state. If _CST is not found or usable, > should acpi_state_table.count be reset to go back to the old behaviour?
Yes, it should, although I would reset it in intel_idle_cst_usable() right away before returning 'false'. I can send a patch to do the above or please submit the one below as it works too. > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c > index 13600c403035..3b84f8631b40 100644 > --- a/drivers/idle/intel_idle.c > +++ b/drivers/idle/intel_idle.c > @@ -1261,6 +1261,7 @@ static bool intel_idle_acpi_cst_extract(void) > return true; > } > > + acpi_state_table.count = 0; > pr_debug("ACPI _CST not found or not usable\n"); > return false; > } > > --