safe acpi_cpu_idle disabling

Andriy Gapon avg at FreeBSD.org
Sun Jul 8 10:39:23 UTC 2012


I would like to propose the following patch for your review:
http://people.freebsd.org/~avg/acpi_cpu_disable_idle.diff

The main purpose of this change is to provide safe interaction between
acpi_cpu_idle and dynamic C-state changes by disabling acpi_cpu_idle while
C-state data is updated.

If my understanding is correct, currently there is no mutual protection between
acpi_cpu_idle code and acpi_cpu_cx_cst.  The code more or less works by never
cleaning up old C-state data, so it is still accessible while the two functions
have incoherent views.  There still could be problems when acpi_cpu_idle expects
C-state data at certain index to belong to one type while acpi_cpu_cx_cst
changes it to a different type.

P.S. I think that cpu_disable_idle should be made per-CPU (go to acpi_cpu softc).

-- 
Andriy Gapon



More information about the freebsd-acpi mailing list