d5532ee7b4
MSR_IA32_ENERGY_PERF_BIAS first became available on Westmere Xeon. It is implemented in all Sandy Bridge processors -- mobile, desktop and server. It is expected to become increasingly important in subsequent generations. x86_energy_perf_policy is a user-space utility to set the hardware energy vs performance policy hint in the processor. Most systems would benefit from "x86_energy_perf_policy normal" at system startup, as the hardware default is maximum performance at the expense of energy efficiency. See x86_energy_perf_policy.8 man page for more information. Background: Linux-2.6.36 added "epb" to /proc/cpuinfo to indicate if an x86 processor supports MSR_IA32_ENERGY_PERF_BIAS, without actually modifying the MSR. In March, 2010, Venkatesh Pallipadi proposed a small driver that programmed MSR_IA32_ENERGY_PERF_BIAS, based on the cpufreq governor in use. It also offered a boot-time cmdline option to override. http://lkml.org/lkml/2010/3/4/457 But hiding the hardware policy behind the governor choice was deemed "kinda icky". In June, 2010, I proposed a generic user/kernel API to generalize the power/performance policy trade-off. "RFC: /sys/power/policy_preference" http://lkml.org/lkml/2010/6/16/399 That is my preference for implementing this capability, but I received no support on the list. So in September, 2010, I sent x86_energy_perf_policy.c to LKML, a user-space utility that scribbles directly to the MSR. http://lkml.org/lkml/2010/9/28/246 Here is that same utility, after responding to some review feedback, to live in tools/power/, where it is easily found. Signed-off-by: Len Brown <len.brown@intel.com>
105 lines
2.8 KiB
Groff
105 lines
2.8 KiB
Groff
.\" This page Copyright (C) 2010 Len Brown <len.brown@intel.com>
|
|
.\" Distributed under the GPL, Copyleft 1994.
|
|
.TH X86_ENERGY_PERF_POLICY 8
|
|
.SH NAME
|
|
x86_energy_perf_policy \- read or write MSR_IA32_ENERGY_PERF_BIAS
|
|
.SH SYNOPSIS
|
|
.ft B
|
|
.B x86_energy_perf_policy
|
|
.RB [ "\-c cpu" ]
|
|
.RB [ "\-v" ]
|
|
.RB "\-r"
|
|
.br
|
|
.B x86_energy_perf_policy
|
|
.RB [ "\-c cpu" ]
|
|
.RB [ "\-v" ]
|
|
.RB 'performance'
|
|
.br
|
|
.B x86_energy_perf_policy
|
|
.RB [ "\-c cpu" ]
|
|
.RB [ "\-v" ]
|
|
.RB 'normal'
|
|
.br
|
|
.B x86_energy_perf_policy
|
|
.RB [ "\-c cpu" ]
|
|
.RB [ "\-v" ]
|
|
.RB 'powersave'
|
|
.br
|
|
.B x86_energy_perf_policy
|
|
.RB [ "\-c cpu" ]
|
|
.RB [ "\-v" ]
|
|
.RB n
|
|
.br
|
|
.SH DESCRIPTION
|
|
\fBx86_energy_perf_policy\fP
|
|
allows software to convey
|
|
its policy for the relative importance of performance
|
|
versus energy savings to the processor.
|
|
|
|
The processor uses this information in model-specific ways
|
|
when it must select trade-offs between performance and
|
|
energy efficiency.
|
|
|
|
This policy hint does not supersede Processor Performance states
|
|
(P-states) or CPU Idle power states (C-states), but allows
|
|
software to have influence where it would otherwise be unable
|
|
to express a preference.
|
|
|
|
For example, this setting may tell the hardware how
|
|
aggressively or conservatively to control frequency
|
|
in the "turbo range" above the explicitly OS-controlled
|
|
P-state frequency range. It may also tell the hardware
|
|
how aggressively is should enter the OS requested C-states.
|
|
|
|
Support for this feature is indicated by CPUID.06H.ECX.bit3
|
|
per the Intel Architectures Software Developer's Manual.
|
|
|
|
.SS Options
|
|
\fB-c\fP limits operation to a single CPU.
|
|
The default is to operate on all CPUs.
|
|
Note that MSR_IA32_ENERGY_PERF_BIAS is defined per
|
|
logical processor, but that the initial implementations
|
|
of the MSR were shared among all processors in each package.
|
|
.PP
|
|
\fB-v\fP increases verbosity. By default
|
|
x86_energy_perf_policy is silent.
|
|
.PP
|
|
\fB-r\fP is for "read-only" mode - the unchanged state
|
|
is read and displayed.
|
|
.PP
|
|
.I performance
|
|
Set a policy where performance is paramount.
|
|
The processor will be unwilling to sacrifice any performance
|
|
for the sake of energy saving. This is the hardware default.
|
|
.PP
|
|
.I normal
|
|
Set a policy with a normal balance between performance and energy efficiency.
|
|
The processor will tolerate minor performance compromise
|
|
for potentially significant energy savings.
|
|
This reasonable default for most desktops and servers.
|
|
.PP
|
|
.I powersave
|
|
Set a policy where the processor can accept
|
|
a measurable performance hit to maximize energy efficiency.
|
|
.PP
|
|
.I n
|
|
Set MSR_IA32_ENERGY_PERF_BIAS to the specified number.
|
|
The range of valid numbers is 0-15, where 0 is maximum
|
|
performance and 15 is maximum energy efficiency.
|
|
|
|
.SH NOTES
|
|
.B "x86_energy_perf_policy "
|
|
runs only as root.
|
|
.SH FILES
|
|
.ta
|
|
.nf
|
|
/dev/cpu/*/msr
|
|
.fi
|
|
|
|
.SH "SEE ALSO"
|
|
msr(4)
|
|
.PP
|
|
.SH AUTHORS
|
|
.nf
|
|
Written by Len Brown <len.brown@intel.com>
|