1X86_ENERGY_PERF_POLICY(8)   System Manager's Manual  X86_ENERGY_PERF_POLICY(8)
2
3
4

NAME

6       x86_energy_perf_policy  -  Manage Energy vs. Performance Policy via x86
7       Model Specific Registers
8

SYNOPSIS

10       x86_energy_perf_policy [ options ] [ scope ] [field  value]
11       scope: --cpu cpu-list | --pkg pkg-list
12       cpu-list, pkg-list: # | #,# | #-# | all
13       field: --all | --epb | --hwp-epp  |  --hwp-min  |  --hwp-max  |  --hwp-
14       desired
15       other: (--force | --hwp-enable | --turbo-enable)  value)
16       value:  # | default | performance | balance-performance | balance-power
17       | power
18

DESCRIPTION

20       x86_energy_perf_policy displays and updates  energy-performance  policy
21       settings  specific  to  Intel  Architecture  Processors.   Settings are
22       accessed via Model Specific Register (MSR) updates, no  matter  if  the
23       Linux cpufreq sub-system is enabled or not.
24
25       Policy  in  MSR_IA32_ENERGY_PERF_BIAS  (EPB) may affect a wide range of
26       hardware decisions, such as how aggressively the  hardware  enters  and
27       exits  CPU  idle states (C-states) and Processor Performance States (P-
28       states).  This policy hint does not replace explicit OS C-state and  P-
29       state  selection.   Rather,  it  tells the hardware how aggressively to
30       implement those selections.  Further, it allows  the  OS  to  influence
31       energy/performance  trade-offs  where  there  is no software interface,
32       such as in the opportunistic "turbo-mode"  P-state  range.   Note  that
33       MSR_IA32_ENERGY_PERF_BIAS  is defined per CPU, but some implementations
34       share a single MSR among all CPUs in each processor package.  On  those
35       systems, a write to EPB on one processor will be visible, and will have
36       an effect, on all CPUs in the same processor package.
37
38       Hardware P-States (HWP) are effectively an  expansion  of  hardware  P-
39       state  control  from  the  opportunistic  turbo-mode  P-state  range to
40       include the entire range of available P-states.  On Broadwell Xeon, the
41       initial  HWP  implementation,  EBP  influenced HWP.  That influence was
42       removed  in  subsequent  generations,  where  it  was  moved   to   the
43       Energy_Performance_Preference  (EPP)  field in a pair of dedicated MSRs
44       -- MSR_IA32_HWP_REQUEST and MSR_IA32_HWP_REQUEST_PKG.
45
46       EPP  is  the  most   commonly   managed   knob   in   HWP   mode,   but
47       MSR_IA32_HWP_REQUEST  also allows the user to specify minimum-frequency
48       for  Quality-of-Service,  and  maximum-frequency   for   power-capping.
49       MSR_IA32_HWP_REQUEST is defined per-CPU.
50
51       MSR_IA32_HWP_REQUEST_PKG     has     the     same     capability     as
52       MSR_IA32_HWP_REQUEST, but it can simultaneously set the default  policy
53       for  all  CPUs within a package.  A bit in per-CPU MSR_IA32_HWP_REQUEST
54       indicates    whether    it    is    over-ruled-by    or     exempt-from
55       MSR_IA32_HWP_REQUEST_PKG.
56
57       MSR_HWP_CAPABILITIES  shows  the  default  values  for  the  fields  in
58       MSR_IA32_HWP_REQUEST.  It is displayed when no values are  being  writ‐
59       ten.
60
61
62   SCOPE OPTIONS
63       -c,  --cpu  Operate  on the MSR_IA32_HWP_REQUEST for each CPU in a CPU-
64       list.  The CPU-list may be comma-separated CPU numbers, with  dash  for
65       range  or  the string "all".  Eg. '--cpu 1,4,6-8' or '--cpu all'.  When
66       --cpu is used, --hwp-use-pkg is available, which specifies whether  the
67       per-cpu     MSR_IA32_HWP_REQUEST     should     be     over-ruled    by
68       MSR_IA32_HWP_REQUEST_PKG (1), or exempt  from  MSR_IA32_HWP_REQUEST_PKG
69       (0).
70
71       -p,  --pkg  Operate on the MSR_IA32_HWP_REQUEST_PKG for each package in
72       the package-list.  The list is a string of individual  package  numbers
73       separated  by  commas,  and or ranges of package numbers separated by a
74       dash, or the string "all".  For example '--pkg 1,3' or '--pkg all'
75
76
77   VALUE OPTIONS
78       normal | default Set a policy with a normal balance between performance
79       and  energy  efficiency.  The processor will tolerate minor performance
80       compromise for potentially significant energy savings.  This is a  rea‐
81       sonable  default for most desktops and servers.  "default" is a synonym
82       for "normal".
83
84       performance Set a policy for maximum performance, accepting no  perfor‐
85       mance sacrifice for the benefit of energy efficiency.
86
87       balance-performance  Set  a policy with a high priority on performance,
88       but allowing some performance loss to benefit energy efficiency.
89
90       balance-power Set a policy where the performance  and  power  are  bal‐
91       anced.  This is the default.
92
93       power  Set a policy where the processor can accept a measurable perfor‐
94       mance impact to maximize energy efficiency.
95
96
97       The following table shows the mapping from the value strings  above  to
98       actual MSR values.  This mapping is defined in the Linux-kernel header,
99       msr-index.h.
100
101       VALUE STRING        EPB  EPP
102       performance         0    0
103       balance-performance 4    128
104       normal, default          6    128
105       balance-power       8    192
106       power               15   255
107
108       For  MSR_IA32_HWP_REQUEST  performance  fields  (--hwp-min,  --hwp-max,
109       --hwp-desired),  the value option is in units of 100 MHz, Eg. 12 signi‐
110       fies 1200 MHz.
111
112
113   FIELD OPTIONS
114       -a, --all value-string Sets all EPB and EPP and HWP limit fields to the
115       value  associated  with  the value-string.  In addition, enables turbo-
116       mode and HWP-mode, if they were previous disabled.  Thus "--all normal"
117       will set a system without cpufreq into a well known configuration.
118
119       -B,  --epb  set  EPB per-core or per-package.  See value strings in the
120       table above.
121
122       -d, --debug debug increases verbosity.  By default x86_energy_perf_pol‐
123       icy is silent for updates, and verbose for read-only mode.
124
125       -P,  --hwp-epp  set HWP.EPP per-core or per-package.  See value strings
126       in the table above.
127
128       -m, --hwp-min request HWP to not go below the specified core/bus ratio.
129       The "default" is the value found in IA32_HWP_CAPABILITIES.min.
130
131       -M,  --hwp-max  request  HWP not exceed a the specified core/bus ratio.
132       The "default" is the value found in IA32_HWP_CAPABILITIES.max.
133
134       -D, --hwp-desired request HWP 'desired' frequency.  The  "normal"  set‐
135       ting  is  0,  which corresponds to 'full autonomous' HWP control.  Non-
136       zero performance values request a specific performance  level  on  this
137       processor, specified in multiples of 100 MHz.
138
139       -w, --hwp-window specify integer number of microsec in the sliding win‐
140       dow that HWP uses to maintain average  frequency.   This  parameter  is
141       meaningful only when the "desired" field above is non-zero.  Default is
142       0, allowing the HW to choose.
143

OTHER OPTIONS

145       -f, --force writes the specified values without bounds checking.
146
147       -U, --hwp-use-pkg (0 | 1), when used in conjunction with  --cpu,  indi‐
148       cates  whether the per-CPU MSR_IA32_HWP_REQUEST should be overruled (1)
149       or exempt (0) from per-Package MSR_IA32_HWP_REQUEST_PKG settings.   The
150       default is exempt.
151
152       -H,  --hwp-enable  enable  HardWare-P-state  (HWP) mode.  Once enabled,
153       system RESET is required to disable HWP mode.
154
155       -t, --turbo-enable enable (1) or disable (0) turbo mode.
156
157       -v, --version print version and exit.
158
159       If no request to change policy is made, the default behavior is to read
160       and  display  the current system state, including the default capabili‐
161       ties.
162

WARNING

164       This utility writes directly to Model Specific Registers.  There is  no
165       locking or coordination should this utility be used to modify HWP limit
166       fields at the same time that intel_pstate's sysfs attributes access the
167       same MSRs.
168
169       Note  that  --hwp-desired and --hwp-window are considered experimental.
170       Future versions of Linux reserve  the  right  to  access  these  fields
171       internally -- potentially conflicting with user-space access.
172

EXAMPLE

174       # sudo x86_energy_perf_policy
175       cpu0: EPB 6
176       cpu0: HWP_REQ: min 6 max 35 des 0 epp 128 window 0x0 (0*10^0us) use_pkg 0
177       cpu0: HWP_CAP: low 1 eff 8 guar 27 high 35
178       cpu1: EPB 6
179       cpu1: HWP_REQ: min 6 max 35 des 0 epp 128 window 0x0 (0*10^0us) use_pkg 0
180       cpu1: HWP_CAP: low 1 eff 8 guar 27 high 35
181       cpu2: EPB 6
182       cpu2: HWP_REQ: min 6 max 35 des 0 epp 128 window 0x0 (0*10^0us) use_pkg 0
183       cpu2: HWP_CAP: low 1 eff 8 guar 27 high 35
184       cpu3: EPB 6
185       cpu3: HWP_REQ: min 6 max 35 des 0 epp 128 window 0x0 (0*10^0us) use_pkg 0
186       cpu3: HWP_CAP: low 1 eff 8 guar 27 high 35
187

NOTES

189       x86_energy_perf_policy runs only as root.
190

FILES

192       /dev/cpu/*/msr
193

SEE ALSO

195       msr(4)
196       Intel(R) 64 and IA-32 Architectures Software Developer's Manual
197

AUTHORS

199       Len Brown
200
201
202
203                                                     X86_ENERGY_PERF_POLICY(8)
Impressum