Skip to content

Commit 33aa46f

Browse files
committed
cpufreq: intel_pstate: Use passive mode by default without HWP
After recent changes allowing scale-invariant utilization to be used on x86, the schedutil governor on top of intel_pstate in the passive mode should be on par with (or better than) the active mode "powersave" algorithm of intel_pstate on systems in which hardware-managed P-states (HWP) are not used, so it should not be necessary to use the internal scaling algorithm in those cases. Accordingly, modify intel_pstate to start in the passive mode by default if the processor at hand does not support HWP of if the driver is requested to avoid using HWP through the kernel command line. Among other things, that will allow utilization clamps and the support for RT/DL tasks in the schedutil governor to be utilized on systems in which intel_pstate is used. Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 8f3d9f3 commit 33aa46f

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

Documentation/admin-guide/pm/intel_pstate.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ on the capabilities of the processor.
6262
Active Mode
6363
-----------
6464

65-
This is the default operation mode of ``intel_pstate``. If it works in this
66-
mode, the ``scaling_driver`` policy attribute in ``sysfs`` for all ``CPUFreq``
67-
policies contains the string "intel_pstate".
65+
This is the default operation mode of ``intel_pstate`` for processors with
66+
hardware-managed P-states (HWP) support. If it works in this mode, the
67+
``scaling_driver`` policy attribute in ``sysfs`` for all ``CPUFreq`` policies
68+
contains the string "intel_pstate".
6869

6970
In this mode the driver bypasses the scaling governors layer of ``CPUFreq`` and
7071
provides its own scaling algorithms for P-state selection. Those algorithms
@@ -138,12 +139,13 @@ internal P-state selection logic to be less performance-focused.
138139
Active Mode Without HWP
139140
~~~~~~~~~~~~~~~~~~~~~~~
140141

141-
This is the default operation mode for processors that do not support the HWP
142-
feature. It also is used by default with the ``intel_pstate=no_hwp`` argument
143-
in the kernel command line. However, in this mode ``intel_pstate`` may refuse
144-
to work with the given processor if it does not recognize it. [Note that
145-
``intel_pstate`` will never refuse to work with any processor with the HWP
146-
feature enabled.]
142+
This operation mode is optional for processors that do not support the HWP
143+
feature or when the ``intel_pstate=no_hwp`` argument is passed to the kernel in
144+
the command line. The active mode is used in those cases if the
145+
``intel_pstate=active`` argument is passed to the kernel in the command line.
146+
In this mode ``intel_pstate`` may refuse to work with processors that are not
147+
recognized by it. [Note that ``intel_pstate`` will never refuse to work with
148+
any processor with the HWP feature enabled.]
147149

148150
In this mode ``intel_pstate`` registers utilization update callbacks with the
149151
CPU scheduler in order to run a P-state selection algorithm, either
@@ -188,10 +190,14 @@ is not set.
188190
Passive Mode
189191
------------
190192

191-
This mode is used if the ``intel_pstate=passive`` argument is passed to the
192-
kernel in the command line (it implies the ``intel_pstate=no_hwp`` setting too).
193-
Like in the active mode without HWP support, in this mode ``intel_pstate`` may
194-
refuse to work with the given processor if it does not recognize it.
193+
This is the default operation mode of ``intel_pstate`` for processors without
194+
hardware-managed P-states (HWP) support. It is always used if the
195+
``intel_pstate=passive`` argument is passed to the kernel in the command line
196+
regardless of whether or not the given processor supports HWP. [Note that the
197+
``intel_pstate=no_hwp`` setting implies ``intel_pstate=passive`` if it is used
198+
without ``intel_pstate=active``.] Like in the active mode without HWP support,
199+
in this mode ``intel_pstate`` may refuse to work with processors that are not
200+
recognized by it.
195201

196202
If the driver works in this mode, the ``scaling_driver`` policy attribute in
197203
``sysfs`` for all ``CPUFreq`` policies contains the string "intel_cpufreq".

drivers/cpufreq/intel_pstate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2771,6 +2771,8 @@ static int __init intel_pstate_init(void)
27712771
pr_info("Invalid MSRs\n");
27722772
return -ENODEV;
27732773
}
2774+
/* Without HWP start in the passive mode. */
2775+
default_driver = &intel_cpufreq;
27742776

27752777
hwp_cpu_matched:
27762778
/*
@@ -2816,7 +2818,6 @@ static int __init intel_pstate_setup(char *str)
28162818
if (!strcmp(str, "disable")) {
28172819
no_load = 1;
28182820
} else if (!strcmp(str, "passive")) {
2819-
pr_info("Passive mode enabled\n");
28202821
default_driver = &intel_cpufreq;
28212822
no_hwp = 1;
28222823
}

0 commit comments

Comments
 (0)