linux/Documentation/admin-guide/pm
Srinivas Pandruvada ed7bde7a6d cpufreq: intel_pstate: Allow enable/disable energy efficiency
By default intel_pstate the driver disables energy efficiency by setting
MSR_IA32_POWER_CTL bit 19 for Kaby Lake desktop CPU model in HWP mode.
This CPU model is also shared by Coffee Lake desktop CPUs. This allows
these systems to reach maximum possible frequency. But this adds power
penalty, which some customers don't want. They want some way to enable/
disable dynamically.

So, add an additional attribute "energy_efficiency" under
/sys/devices/system/cpu/intel_pstate/ for these CPU models. This allows
to read and write bit 19 ("Disable Energy Efficiency Optimization") in
the MSR IA32_POWER_CTL.

This attribute is present in both HWP and non-HWP mode as this has an
effect in both modes. Refer to Intel Software Developer's manual for
details.

The scope of this bit is package wide. Also these systems are single
package systems. So read/write MSR on the current CPU is enough.

The energy efficiency (EE) bit setting needs to be preserved during
suspend/resume and CPU offline/online operation. To do this:
- Restoring the EE setting from the cpufreq resume() callback, if there
is change from the system default.
- By default, don't disable EE from cpufreq init() callback for matching
CPU models. Since the scope is package wide and is a single package
system, move the disable EE calls from init() callback to
intel_pstate_init() function, which is called only once.

Suggested-by: Len Brown <lenb@kernel.org>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-07-02 13:02:46 +02:00
..
cpufreq.rst Documentation: PM: Unify copyright notices 2019-04-08 12:57:47 +02:00
cpufreq_drivers.rst Documentation: cpufreq: Move legacy driver documentation 2020-03-02 11:31:06 +01:00
cpuidle.rst Documentation: cpuidle: update the document 2020-05-19 17:41:17 +02:00
index.rst Documentation: PM: Add SPDX license tags to multiple files 2019-04-08 12:57:47 +02:00
intel-speed-select.rst Documentation: admin-guide: pm: Document intel-speed-select 2020-05-19 19:59:10 +02:00
intel_epb.rst admin-guide: pm: intel_epb: Add SPDX license tag and copyright notice 2019-04-08 12:59:09 +02:00
intel_idle.rst intel_idle: Introduce 'states_off' module parameter 2020-02-03 11:57:18 +01:00
intel_pstate.rst cpufreq: intel_pstate: Allow enable/disable energy efficiency 2020-07-02 13:02:46 +02:00
sleep-states.rst Documentation: admin-guide: PM: Update sleep states documentation 2020-02-03 11:58:26 +01:00
strategies.rst Documentation: PM: Unify copyright notices 2019-04-08 12:57:47 +02:00
suspend-flows.rst Documentation: PM: sleep: Document system-wide suspend code flows 2020-04-03 11:41:01 +02:00
system-wide.rst Documentation: PM: sleep: Document system-wide suspend code flows 2020-04-03 11:41:01 +02:00
working-state.rst Documentation: admin-guide: pm: Document intel-speed-select 2020-05-19 19:59:10 +02:00