blob: 765d7fc0e692182a6c9952f4a023eed553883612 [file] [log] [blame]
Ramkumar Ramachandraa3ea0152014-01-05 15:51:14 +05301Intel P-state driver
2--------------------
3
Dirk Brandewie2f86dc42014-11-06 09:40:47 -08004This driver provides an interface to control the P state selection for
5SandyBridge+ Intel processors. The driver can operate two different
6modes based on the processor model legacy and Hardware P state (HWP)
7mode.
Ramkumar Ramachandraa3ea0152014-01-05 15:51:14 +05308
Dirk Brandewie2f86dc42014-11-06 09:40:47 -08009In legacy mode the driver implements a scaling driver with an internal
10governor for Intel Core processors. The driver follows the same model
11as the Transmeta scaling driver (longrun.c) and implements the
12setpolicy() instead of target(). Scaling drivers that implement
13setpolicy() are assumed to implement internal governors by the cpufreq
14core. All the logic for selecting the current P state is contained
15within the driver; no external governor is used by the cpufreq core.
Ramkumar Ramachandraa3ea0152014-01-05 15:51:14 +053016
Dirk Brandewie2f86dc42014-11-06 09:40:47 -080017In HWP mode P state selection is implemented in the processor
18itself. The driver provides the interfaces between the cpufreq core and
19the processor to control P state selection based on user preferences
20and reporting frequency to the cpufreq core. In this mode the
21internal governor code is disabled.
22
23In addtion to the interfaces provided by the cpufreq core for
24controlling frequency the driver provides sysfs files for
25controlling P state selection. These files have been added to
Ramkumar Ramachandraa3ea0152014-01-05 15:51:14 +053026/sys/devices/system/cpu/intel_pstate/
27
28 max_perf_pct: limits the maximum P state that will be requested by
Dirk Brandewie41629a82014-06-20 07:28:00 -070029 the driver stated as a percentage of the available performance. The
30 available (P states) performance may be reduced by the no_turbo
31 setting described below.
Ramkumar Ramachandraa3ea0152014-01-05 15:51:14 +053032
33 min_perf_pct: limits the minimum P state that will be requested by
Dirk Brandewie41629a82014-06-20 07:28:00 -070034 the driver stated as a percentage of the max (non-turbo)
35 performance level.
Ramkumar Ramachandraa3ea0152014-01-05 15:51:14 +053036
37 no_turbo: limits the driver to selecting P states below the turbo
38 frequency range.
39
40For contemporary Intel processors, the frequency is controlled by the
41processor itself and the P-states exposed to software are related to
42performance levels. The idea that frequency can be set to a single
43frequency is fiction for Intel Core processors. Even if the scaling
44driver selects a single P state the actual frequency the processor
45will run at is selected by the processor itself.
46
Dirk Brandewie2f86dc42014-11-06 09:40:47 -080047For legacy mode debugfs files have also been added to allow tuning of
48the internal governor algorythm. These files are located at
49/sys/kernel/debug/pstate_snb/ These files are NOT present in HWP mode.
Ramkumar Ramachandraa3ea0152014-01-05 15:51:14 +053050
51 deadband
52 d_gain_pct
53 i_gain_pct
54 p_gain_pct
55 sample_rate_ms
56 setpoint