Home | History | Annotate | Download | only in acpi
History log of /src/sys/dev/acpi/acpi_cpu_tstate.c
RevisionDateAuthorComments
 1.34  07-Dec-2020  jmcneill acpicpu: Add support for ACPI P-states and T-states on Arm.
 1.33  01-Jun-2017  chs branches: 1.33.24;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.32  20-Nov-2013  jruoho branches: 1.32.6;
As discussed with bouyer@, fix a too eager T-state validation check to
accomodate new Intel CPUs.
 1.31  27-Apr-2012  jruoho branches: 1.31.2; 1.31.4;
Remove the upper limit for the number of T-states.
 1.30  22-Jun-2011  jruoho branches: 1.30.2; 1.30.6; 1.30.8;
Get rid of RUN_ONCE(9). Should fix PR # kern/44043.
 1.29  22-Jun-2011  jruoho Contrary to the previous, use aprint_error(9) but suppress warnings
caused by the (optional) BIOS-based dynamic voltage and frequency scaling.
 1.28  04-Jun-2011  jruoho Change some printfs to aprint_debug(9).
 1.27  19-Mar-2011  jruoho branches: 1.27.2;
Like in rest of the acpi(4) stack, queue all resume hooks.
 1.26  01-Mar-2011  jruoho branches: 1.26.2;
Move also the evcnt(9) event counters to one place. No functional change.
 1.25  01-Mar-2011  jruoho Simplify by moving the debug printfs to one place. No functional change.
 1.24  01-Mar-2011  jruoho Move the xcall(9) that does the P- and T-state transformations from the MD
layer to the main code. Makes the caches coherent and provides consistent
vmstat(1) output. This is still not quite right, given that most of the
cross-calls are typically unnecessary with the dependency coordination.
 1.23  25-Feb-2011  jruoho Start to derive the percpu(9) (or per-domain) state coordination
mechanisms by parsing the _CSD, _PSD, and _TSD objects by default.
 1.22  25-Feb-2011  jruoho Clarify a comment.
 1.21  23-Feb-2011  jruoho Lower the worst-case latency in P- and T-state transitions to 1 usec.
The previous 10 usec was based on the Intel's Core family. It may have been
improved since that. Also provide an arbitrary upper bound for BIOS bugs.
 1.20  18-Feb-2011  jruoho Remove the (debug) check that evaluated whether the first T-state (i.e. the
100 % duty cycle) had control value of zero, as in the IA32 clock modulation
MSR. As the access may be based on I/O, it is unclear if a strict validation
like this was correct. Should fix the problem reported by Hisashi T Fujinaka
on current users.
 1.19  30-Jan-2011  jruoho Improve error reporting.
 1.18  30-Dec-2010  jruoho branches: 1.18.2; 1.18.4;
Change the default behavior to enforce the maximum frequency when the
firmware requests to do so. This cures severe overhating (> 120 C) observed
on many laptops, being also on par with the specification(s). This can be
reverted by using the new "hw.acpi.cpu.dynamic" sysctl variable.
 1.17  20-Dec-2010  jruoho Use branch annotations in couple of places. Add two comments.
 1.16  21-Aug-2010  jruoho branches: 1.16.2;
After discussion with jakllsch@ and jmcneill@, revert the previous and only
do the status-check when the comparison value reported by BIOS is not zero.
The uncertainty noted in the previous commit still applies. But if we ever
see a timeout again, it will likely be either a firmware bug or a special
case like the Intel Turbo Boost.
 1.15  20-Aug-2010  jruoho Check the cached value also when setting a state.
 1.14  17-Aug-2010  jruoho Adjust locking for previous.
 1.13  17-Aug-2010  jruoho Clarify the initialization of the dynamic maximums/minimums. Reset these to
defaults upon suspend. As we do not know how well the firmware maintains
state, do not run the callbacks that evaluate the maximum/minimum on resume.
 1.12  17-Aug-2010  jruoho Add support for the optional dynamic minimum (in terms of MHz) via _PDL.
Comparable to T-states, this gives effectively a window of available
performance states for passive cooling. An example:

Init: max = 0, min = Pn.

Time j. Time j + 1.
----------- -----------
2000 MHz P0 max P0
P1 P1 max
P2 ==> P2
P3 P3 min
P4 P4
P5 min P5
500 Mhz Pn Pn
----------- -----------

Search: repeat (i = P0; i <= P5) repeat (i = P1; i <= P3)
 1.11  16-Aug-2010  jruoho branches: 1.11.2;
Now that the deferred configuration actually works as expected and documented,
use config_defer(9) instead of config_finalize_register(9), and simplify the
code paths around the initialization.
 1.10  16-Aug-2010  jruoho Do not error out neither in P-states nor in T-states if the method for the
dynamic maximum is nonexistent. Unsurprisingly, there is vagueness in the
standards; in ACPI 3.0 and 4.0 it is clearly indicated that also these methods
must be present, but the earlier standards are less stringent. Without too
much effort, at least one old P4-system was located that lacks _PPC.
 1.9  15-Aug-2010  jruoho Add comments and raise the minimum allowed T-state duty cycle to 10 %.
 1.8  15-Aug-2010  jruoho Properly deal with the previous FADT-issue.
 1.7  14-Aug-2010  jruoho Simplify the FADT-based entry by "faking" (overriding) also the address.
 1.6  14-Aug-2010  jruoho Do not queue functions via sysmon_taskq(9) in the pmf(9) resume hooks.
There is a small and unlikely race when the drivers are loaded as modules;
suspend, resume, queue a function, and immediately unload the module.
 1.5  14-Aug-2010  jruoho Move the PIIX4-quirk to the MD file and disable T-states for PIIX4.
 1.4  13-Aug-2010  jruoho Explicitly include <sys/evcnt.h>.
 1.3  13-Aug-2010  jruoho Instead of packing structures that do not need to be __packed, remove two
CTASSERT(9) macros. Fixes build failure on AMD64 noted by cegger@.
 1.2  13-Aug-2010  jruoho Remove some unnecessary locking. Mainly a leftover from previous revisions
where the dynamic maximum/minimum was used also when retrieving the current
state. The state-array itself changes only in C-states.
 1.1  13-Aug-2010  jruoho Merge T-state a.k.a. throttling support for acpicpu(4).

Remarks:

1. Native instructions are supported only on Intel. Native support for
other x86 vendors will be investigated. By assumption, AMD and others
use the I/O based approach.

2. The existing code, INTEL_ONDEMAND_CLOCKMOD, must be disabled in
order to use acpicpu(4). Otherwise fatal MSR races may occur.
Unlike with P-states, no attempt is done to disable the existing
implementation.

3. There is no rationale to export controls to user land.

4. Throttling is an artefact from the past. T-states will not be used for
power management per se. For CPU frequency management, P-states are
preferred in all circumstances. No noticeable additional power savings
were observed in various experiments. When the system has been scaled
to the highest (i.e. lowest power) P-state, it is preferable to move
from C0 to deeper C-states than it is to actively throttle the CPU.

5. But T-states need to be implemented for passive cooling via acpitz(4).
As specified by ACPI and Intel documents, these can be used as the
last line of defence against critical thermal conditions. Support
for this will be added later.
 1.11.2.3  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.11.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.11.2.1  16-Aug-2010  uebayasi file acpi_cpu_tstate.c was added on branch uebayasi-xip on 2010-08-17 06:45:59 +0000
 1.16.2.2  09-Oct-2010  yamt sync with head
 1.16.2.1  21-Aug-2010  yamt file acpi_cpu_tstate.c was added on branch yamt-nfs-mp on 2010-10-09 03:32:04 +0000
 1.18.4.2  05-Mar-2011  bouyer Sync with HEAD
 1.18.4.1  08-Feb-2011  bouyer Sync with HEAD
 1.18.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.26.2.4  12-Jun-2011  rmind sync with head
 1.26.2.3  21-Apr-2011  rmind sync with head
 1.26.2.2  05-Mar-2011  rmind sync with head
 1.26.2.1  01-Mar-2011  rmind file acpi_cpu_tstate.c was added on branch rmind-uvmplock on 2011-03-05 20:53:02 +0000
 1.27.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.30.8.2  17-Dec-2013  riz Pull up following revision(s) (requested by bouyer in ticket #984):
sys/dev/acpi/acpi_cpu.h: revision 1.44
sys/dev/acpi/acpi_cpu_tstate.c: revision 1.31
Remove the upper limit for the number of T-states.
 1.30.8.1  25-Nov-2013  bouyer Pull up following revision(s) (requested by jruoho in ticket #987):
sys/arch/x86/acpi/acpi_cpu_md.c: revision 1.74
sys/dev/acpi/acpi_cpu_tstate.c: revision 1.32
As discussed with bouyer@, fix a too eager T-state validation check to
accomodate new Intel CPUs.
Allow 4-bit range for MSR_THERM_CONTROL.
 1.30.6.1  29-Apr-2012  mrg sync to latest -current.
 1.30.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.30.2.1  23-May-2012  yamt sync with head.
 1.31.4.1  18-May-2014  rmind sync with head
 1.31.2.2  03-Dec-2017  jdolecek update from HEAD
 1.31.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.6.1  28-Aug-2017  skrll Sync with HEAD
 1.33.24.1  14-Dec-2020  thorpej Sync w/ HEAD.

RSS XML Feed