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