Skip to content

Commit 8f5e823

Browse files
committed
Merge tag 'pm-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki: "These fix the (Intel-specific) Performance and Energy Bias Hint (EPB) handling and expose it to user space via sysfs, fix and clean up several cpufreq drivers, add support for two new chips to the qoriq cpufreq driver, fix, simplify and clean up the cpufreq core and the schedutil governor, add support for "CPU" domains to the generic power domains (genpd) framework and provide low-level PSCI firmware support for that feature, fix the exynos cpuidle driver and fix a couple of issues in the devfreq subsystem and clean it up. Specifics: - Fix the handling of Performance and Energy Bias Hint (EPB) on Intel processors and expose it to user space via sysfs to avoid having to access it through the generic MSR I/F (Rafael Wysocki). - Improve the handling of global turbo changes made by the platform firmware in the intel_pstate driver (Rafael Wysocki). - Convert some slow-path static_cpu_has() callers to boot_cpu_has() in cpufreq (Borislav Petkov). - Fix the frequency calculation loop in the armada-37xx cpufreq driver (Gregory CLEMENT). - Fix possible object reference leaks in multuple cpufreq drivers (Wen Yang). - Fix kerneldoc comment in the centrino cpufreq driver (dongjian). - Clean up the ACPI and maple cpufreq drivers (Viresh Kumar, Mohan Kumar). - Add support for lx2160a and ls1028a to the qoriq cpufreq driver (Vabhav Sharma, Yuantian Tang). - Fix kobject memory leak in the cpufreq core (Viresh Kumar). - Simplify the IOwait boosting in the schedutil cpufreq governor and rework the TSC cpufreq notifier on x86 (Rafael Wysocki). - Clean up the cpufreq core and statistics code (Yue Hu, Kyle Lin). - Improve the cpufreq documentation, add SPDX license tags to some PM documentation files and unify copyright notices in them (Rafael Wysocki). - Add support for "CPU" domains to the generic power domains (genpd) framework and provide low-level PSCI firmware support for that feature (Ulf Hansson). - Rearrange the PSCI firmware support code and add support for SYSTEM_RESET2 to it (Ulf Hansson, Sudeep Holla). - Improve genpd support for devices in multiple power domains (Ulf Hansson). - Unify target residency for the AFTR and coupled AFTR states in the exynos cpuidle driver (Marek Szyprowski). - Introduce new helper routine in the operating performance points (OPP) framework (Andrew-sh.Cheng). - Add support for passing on-die termination (ODT) and auto power down parameters from the kernel to Trusted Firmware-A (TF-A) to the rk3399_dmc devfreq driver (Enric Balletbo i Serra). - Add tracing to devfreq (Lukasz Luba). - Make the exynos-bus devfreq driver suspend all devices on system shutdown (Marek Szyprowski). - Fix a few minor issues in the devfreq subsystem and clean it up somewhat (Enric Balletbo i Serra, MyungJoo Ham, Rob Herring, Saravana Kannan, Yangtao Li). - Improve system wakeup diagnostics (Stephen Boyd). - Rework filesystem sync messages emitted during system suspend and hibernation (Harry Pan)" * tag 'pm-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (72 commits) cpufreq: Fix kobject memleak cpufreq: armada-37xx: fix frequency calculation for opp cpufreq: centrino: Fix centrino_setpolicy() kerneldoc comment cpufreq: qoriq: add support for lx2160a x86: tsc: Rework time_cpufreq_notifier() PM / Domains: Allow to attach a CPU via genpd_dev_pm_attach_by_id|name() PM / Domains: Search for the CPU device outside the genpd lock PM / Domains: Drop unused in-parameter to some genpd functions PM / Domains: Use the base device for driver_deferred_probe_check_state() cpufreq: qoriq: Add ls1028a chip support PM / Domains: Enable genpd_dev_pm_attach_by_id|name() for single PM domain PM / Domains: Allow OF lookup for multi PM domain case from ->attach_dev() PM / Domains: Don't kfree() the virtual device in the error path cpufreq: Move ->get callback check outside of __cpufreq_get() PM / Domains: remove unnecessary unlikely() cpufreq: Remove needless bios_limit check in show_bios_limit() drivers/cpufreq/acpi-cpufreq.c: This fixes the following checkpatch warning firmware/psci: add support for SYSTEM_RESET2 PM / devfreq: add tracing for scheduling work trace: events: add devfreq trace event file ...
2 parents 59df1c2 + e07095c commit 8f5e823

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1240
-390
lines changed

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,3 +520,21 @@ Description: Control Symetric Multi Threading (SMT)
520520

521521
If control status is "forceoff" or "notsupported" writes
522522
are rejected.
523+
524+
What: /sys/devices/system/cpu/cpu#/power/energy_perf_bias
525+
Date: March 2019
526+
527+
Description: Intel Energy and Performance Bias Hint (EPB)
528+
529+
EPB for the given CPU in a sliding scale 0 - 15, where a value
530+
of 0 corresponds to a hint preference for highest performance
531+
and a value of 15 corresponds to the maximum energy savings.
532+
533+
In order to change the EPB value for the CPU, write either
534+
a number in the 0 - 15 sliding scale above, or one of the
535+
strings: "performance", "balance-performance", "normal",
536+
"balance-power", "power" (that represent values reflected by
537+
their meaning), to this attribute.
538+
539+
This attribute is present for all online CPUs supporting the
540+
Intel EPB feature.

Documentation/admin-guide/pm/cpufreq.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
.. include:: <isonum.txt>
3+
14
.. |struct cpufreq_policy| replace:: :c:type:`struct cpufreq_policy <cpufreq_policy>`
25
.. |intel_pstate| replace:: :doc:`intel_pstate <intel_pstate>`
36

47
=======================
58
CPU Performance Scaling
69
=======================
710

8-
::
11+
:Copyright: |copy| 2017 Intel Corporation
12+
13+
:Author: Rafael J. Wysocki <[email protected]>
914

10-
Copyright (c) 2017 Intel Corp., Rafael J. Wysocki <[email protected]>
1115

1216
The Concept of CPU Performance Scaling
1317
======================================
@@ -396,8 +400,8 @@ RT or deadline scheduling classes, the governor will increase the frequency to
396400
the allowed maximum (that is, the ``scaling_max_freq`` policy limit). In turn,
397401
if it is invoked by the CFS scheduling class, the governor will use the
398402
Per-Entity Load Tracking (PELT) metric for the root control group of the
399-
given CPU as the CPU utilization estimate (see the `Per-entity load tracking`_
400-
LWN.net article for a description of the PELT mechanism). Then, the new
403+
given CPU as the CPU utilization estimate (see the *Per-entity load tracking*
404+
LWN.net article [1]_ for a description of the PELT mechanism). Then, the new
401405
CPU frequency to apply is computed in accordance with the formula
402406

403407
f = 1.25 * ``f_0`` * ``util`` / ``max``
@@ -698,4 +702,8 @@ hardware feature (e.g. all Intel ones), even if the
698702
:c:macro:`CONFIG_X86_ACPI_CPUFREQ_CPB` configuration option is set.
699703

700704

701-
.. _Per-entity load tracking: https://lwn.net/Articles/531853/
705+
References
706+
==========
707+
708+
.. [1] Jonathan Corbet, *Per-entity load tracking*,
709+
https://lwn.net/Articles/531853/

Documentation/admin-guide/pm/cpuidle.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
.. include:: <isonum.txt>
3+
14
.. |struct cpuidle_state| replace:: :c:type:`struct cpuidle_state <cpuidle_state>`
25
.. |cpufreq| replace:: :doc:`CPU Performance Scaling <cpufreq>`
36

47
========================
58
CPU Idle Time Management
69
========================
710

8-
::
11+
:Copyright: |copy| 2018 Intel Corporation
12+
13+
:Author: Rafael J. Wysocki <[email protected]>
914

10-
Copyright (c) 2018 Intel Corp., Rafael J. Wysocki <[email protected]>
1115

1216
Concepts
1317
========

Documentation/admin-guide/pm/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
13
================
24
Power Management
35
================
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
.. include:: <isonum.txt>
3+
4+
======================================
5+
Intel Performance and Energy Bias Hint
6+
======================================
7+
8+
:Copyright: |copy| 2019 Intel Corporation
9+
10+
:Author: Rafael J. Wysocki <[email protected]>
11+
12+
13+
.. kernel-doc:: arch/x86/kernel/cpu/intel_epb.c
14+
:doc: overview
15+
16+
Intel Performance and Energy Bias Attribute in ``sysfs``
17+
========================================================
18+
19+
The Intel Performance and Energy Bias Hint (EPB) value for a given (logical) CPU
20+
can be checked or updated through a ``sysfs`` attribute (file) under
21+
:file:`/sys/devices/system/cpu/cpu<N>/power/`, where the CPU number ``<N>``
22+
is allocated at the system initialization time:
23+
24+
``energy_perf_bias``
25+
Shows the current EPB value for the CPU in a sliding scale 0 - 15, where
26+
a value of 0 corresponds to a hint preference for highest performance
27+
and a value of 15 corresponds to the maximum energy savings.
28+
29+
In order to update the EPB value for the CPU, this attribute can be
30+
written to, either with a number in the 0 - 15 sliding scale above, or
31+
with one of the strings: "performance", "balance-performance", "normal",
32+
"balance-power", "power" that represent values reflected by their
33+
meaning.
34+
35+
This attribute is present for all online CPUs supporting the EPB
36+
feature.
37+
38+
Note that while the EPB interface to the processor is defined at the logical CPU
39+
level, the physical register backing it may be shared by multiple CPUs (for
40+
example, SMT siblings or cores in one package). For this reason, updating the
41+
EPB value for one CPU may cause the EPB values for other CPUs to change.

Documentation/admin-guide/pm/intel_pstate.rst

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
.. include:: <isonum.txt>
3+
14
===============================================
25
``intel_pstate`` CPU Performance Scaling Driver
36
===============================================
47

5-
::
8+
:Copyright: |copy| 2017 Intel Corporation
69

7-
Copyright (c) 2017 Intel Corp., Rafael J. Wysocki <[email protected]>
10+
:Author: Rafael J. Wysocki <[email protected]>
811

912

1013
General Information
@@ -20,11 +23,10 @@ you have not done that yet.]
2023

2124
For the processors supported by ``intel_pstate``, the P-state concept is broader
2225
than just an operating frequency or an operating performance point (see the
23-
`LinuxCon Europe 2015 presentation by Kristen Accardi <LCEU2015_>`_ for more
26+
LinuxCon Europe 2015 presentation by Kristen Accardi [1]_ for more
2427
information about that). For this reason, the representation of P-states used
2528
by ``intel_pstate`` internally follows the hardware specification (for details
26-
refer to `Intel® 64 and IA-32 Architectures Software Developer’s Manual
27-
Volume 3: System Programming Guide <SDM_>`_). However, the ``CPUFreq`` core
29+
refer to Intel Software Developer’s Manual [2]_). However, the ``CPUFreq`` core
2830
uses frequencies for identifying operating performance points of CPUs and
2931
frequencies are involved in the user space interface exposed by it, so
3032
``intel_pstate`` maps its internal representation of P-states to frequencies too
@@ -561,9 +563,9 @@ or to pin every task potentially sensitive to them to a specific CPU.]
561563

562564
On the majority of systems supported by ``intel_pstate``, the ACPI tables
563565
provided by the platform firmware contain ``_PSS`` objects returning information
564-
that can be used for CPU performance scaling (refer to the `ACPI specification`_
565-
for details on the ``_PSS`` objects and the format of the information returned
566-
by them).
566+
that can be used for CPU performance scaling (refer to the ACPI specification
567+
[3]_ for details on the ``_PSS`` objects and the format of the information
568+
returned by them).
567569

568570
The information returned by the ACPI ``_PSS`` objects is used by the
569571
``acpi-cpufreq`` scaling driver. On systems supported by ``intel_pstate``
@@ -728,6 +730,14 @@ P-state is called, the ``ftrace`` filter can be set to to
728730
<idle>-0 [000] ..s. 2537.654843: intel_pstate_set_pstate <-intel_pstate_timer_func
729731

730732

731-
.. _LCEU2015: http://events.linuxfoundation.org/sites/events/files/slides/LinuxConEurope_2015.pdf
732-
.. _SDM: http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-system-programming-manual-325384.html
733-
.. _ACPI specification: http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf
733+
References
734+
==========
735+
736+
.. [1] Kristen Accardi, *Balancing Power and Performance in the Linux Kernel*,
737+
http://events.linuxfoundation.org/sites/events/files/slides/LinuxConEurope_2015.pdf
738+
739+
.. [2] *Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3: System Programming Guide*,
740+
http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-system-programming-manual-325384.html
741+
742+
.. [3] *Advanced Configuration and Power Interface Specification*,
743+
https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf

Documentation/admin-guide/pm/sleep-states.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
.. include:: <isonum.txt>
3+
14
===================
25
System Sleep States
36
===================
47

5-
::
8+
:Copyright: |copy| 2017 Intel Corporation
9+
10+
:Author: Rafael J. Wysocki <[email protected]>
611

7-
Copyright (c) 2017 Intel Corp., Rafael J. Wysocki <[email protected]>
812

913
Sleep states are global low-power states of the entire system in which user
1014
space code cannot be executed and the overall system activity is significantly

Documentation/admin-guide/pm/strategies.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
.. include:: <isonum.txt>
3+
14
===========================
25
Power Management Strategies
36
===========================
47

5-
::
8+
:Copyright: |copy| 2017 Intel Corporation
9+
10+
:Author: Rafael J. Wysocki <[email protected]>
611

7-
Copyright (c) 2017 Intel Corp., Rafael J. Wysocki <[email protected]>
812

913
The Linux kernel supports two major high-level power management strategies.
1014

Documentation/admin-guide/pm/system-wide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
13
============================
24
System-Wide Power Management
35
============================

Documentation/admin-guide/pm/working-state.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
13
==============================
24
Working-State Power Management
35
==============================
@@ -8,3 +10,4 @@ Working-State Power Management
810
cpuidle
911
cpufreq
1012
intel_pstate
13+
intel_epb

0 commit comments

Comments
 (0)