@@ -48,8 +48,9 @@ only way to pass early-configuration-time parameters to it is via the kernel
4848command line. However, its configuration can be adjusted via ``sysfs `` to a
4949great extent. In some configurations it even is possible to unregister it via
5050``sysfs `` which allows another ``CPUFreq `` scaling driver to be loaded and
51- registered (see `below <status_attr _>`_ ).
51+ registered (see :ref: `below <status_attr >` ).
5252
53+ .. _operation_modes :
5354
5455Operation Modes
5556===============
@@ -62,7 +63,7 @@ a certain performance scaling algorithm. Which of them will be in effect
6263depends on what kernel command line options are used and on the capabilities of
6364the processor.
6465
65- .. _ Active Mode :
66+ .. _ active_mode :
6667
6768Active Mode
6869-----------
@@ -96,7 +97,7 @@ Which of the P-state selection algorithms is used by default depends on the
9697Namely, if that option is set, the ``performance `` algorithm will be used by
9798default, and the other one will be used by default if it is not set.
9899
99- .. _ Active Mode With HWP :
100+ .. _ active_mode_hwp :
100101
101102Active Mode With HWP
102103~~~~~~~~~~~~~~~~~~~~
@@ -127,7 +128,7 @@ Energy-Performance Bias (EPB) knob (otherwise), which means that the processor's
127128internal P-state selection logic is expected to focus entirely on performance.
128129
129130This will override the EPP/EPB setting coming from the ``sysfs `` interface
130- (see ` Energy vs Performance Hints `_ below). Moreover, any attempts to change
131+ (see :ref: ` energy_performance_hints ` below). Moreover, any attempts to change
131132the EPP/EPB to a value different from 0 ("performance") via ``sysfs `` in this
132133configuration will be rejected.
133134
@@ -196,7 +197,7 @@ This is the default P-state selection algorithm if the
196197:c:macro: `CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE ` kernel configuration option
197198is not set.
198199
199- .. _ Passive Mode :
200+ .. _ passive_mode :
200201
201202Passive Mode
202203------------
@@ -295,12 +296,12 @@ Unlike ``_PSS`` objects in the ACPI tables, ``intel_pstate`` always exposes
295296the entire range of available P-states, including the whole turbo range, to the
296297``CPUFreq `` core and (in the passive mode) to generic scaling governors. This
297298generally causes turbo P-states to be set more often when ``intel_pstate `` is
298- used relative to ACPI-based CPU performance scaling (see ` below < acpi-cpufreq _>`_
299- for more information).
299+ used relative to ACPI-based CPU performance scaling (see
300+ :ref: ` below < acpi-cpufreq >` for more information).
300301
301302Moreover, since ``intel_pstate `` always knows what the real turbo threshold is
302303(even if the Configurable TDP feature is enabled in the processor), its
303- ``no_turbo `` attribute in ``sysfs `` (described `below <no_turbo_attr _>`_ ) should
304+ ``no_turbo `` attribute in ``sysfs `` (described :ref: `below <no_turbo_attr >` ) should
304305work as expected in all cases (that is, if set to disable turbo P-states, it
305306always should prevent ``intel_pstate `` from using them).
306307
@@ -313,12 +314,12 @@ pieces of information on it to be known, including:
313314
314315 * The minimum supported P-state.
315316
316- * The maximum supported `non-turbo P-state <turbo _>`_ .
317+ * The maximum supported :ref: `non-turbo P-state <turbo >` .
317318
318319 * Whether or not turbo P-states are supported at all.
319320
320- * The maximum supported `one-core turbo P-state <turbo _>`_ (if turbo P-states
321- are supported).
321+ * The maximum supported :ref: `one-core turbo P-state <turbo >` (if turbo
322+ P-states are supported).
322323
323324 * The scaling formula to translate the driver's internal representation
324325 of P-states into frequencies and the other way around.
@@ -406,10 +407,10 @@ Energy-Aware Scheduling Support
406407
407408If ``CONFIG_ENERGY_MODEL `` has been set during kernel configuration and
408409``intel_pstate `` runs on a hybrid processor without SMT, in addition to enabling
409- `CAS < CAS _>`_ it registers an Energy Model for the processor. This allows the
410+ :ref: `CAS ` it registers an Energy Model for the processor. This allows the
410411Energy-Aware Scheduling (EAS) support to be enabled in the CPU scheduler if
411412``schedutil `` is used as the ``CPUFreq `` governor which requires ``intel_pstate ``
412- to operate in the `passive mode <Passive Mode _>`_ .
413+ to operate in the :ref: `passive mode <passive_mode >` .
413414
414415The Energy Model registered by ``intel_pstate `` is artificial (that is, it is
415416based on abstract cost values and it does not include any real power numbers)
@@ -438,7 +439,7 @@ the ``energy_model`` directory in ``debugfs`` (typlically mounted on
438439User Space Interface in ``sysfs ``
439440=================================
440441
441- .. _ Global Attributes :
442+ .. _ global_attributes :
442443
443444Global Attributes
444445-----------------
@@ -452,17 +453,17 @@ argument is passed to the kernel in the command line.
452453
453454``max_perf_pct ``
454455 Maximum P-state the driver is allowed to set in percent of the
455- maximum supported performance level (the highest supported `turbo
456- P-state <turbo_> `_ ).
456+ maximum supported performance level (the highest supported :ref: `turbo
457+ P-state <turbo>` ).
457458
458459 This attribute will not be exposed if the
459460 ``intel_pstate=per_cpu_perf_limits `` argument is present in the kernel
460461 command line.
461462
462463``min_perf_pct ``
463464 Minimum P-state the driver is allowed to set in percent of the
464- maximum supported performance level (the highest supported `turbo
465- P-state <turbo_> `_ ).
465+ maximum supported performance level (the highest supported :ref: `turbo
466+ P-state <turbo>` ).
466467
467468 This attribute will not be exposed if the
468469 ``intel_pstate=per_cpu_perf_limits `` argument is present in the kernel
@@ -471,18 +472,18 @@ argument is passed to the kernel in the command line.
471472``num_pstates ``
472473 Number of P-states supported by the processor (between 0 and 255
473474 inclusive) including both turbo and non-turbo P-states (see
474- ` Turbo P-states Support `_ ).
475+ :ref: ` turbo ` ).
475476
476477 This attribute is present only if the value exposed by it is the same
477478 for all of the CPUs in the system.
478479
479480 The value of this attribute is not affected by the ``no_turbo ``
480- setting described `below <no_turbo_attr _>`_ .
481+ setting described :ref: `below <no_turbo_attr >` .
481482
482483 This attribute is read-only.
483484
484485``turbo_pct ``
485- Ratio of the `turbo range <turbo _>`_ size to the size of the entire
486+ Ratio of the :ref: `turbo range <turbo >` size to the size of the entire
486487 range of supported P-states, in percent.
487488
488489 This attribute is present only if the value exposed by it is the same
@@ -494,7 +495,7 @@ argument is passed to the kernel in the command line.
494495
495496``no_turbo ``
496497 If set (equal to 1), the driver is not allowed to set any turbo P-states
497- (see ` Turbo P-states Support `_ ). If unset (equal to 0, which is the
498+ (see :ref: ` turbo ` ). If unset (equal to 0, which is the
498499 default), turbo P-states can be set by the driver.
499500 [Note that ``intel_pstate `` does not support the general ``boost ``
500501 attribute (supported by some other scaling drivers) which is replaced
@@ -503,11 +504,11 @@ argument is passed to the kernel in the command line.
503504 This attribute does not affect the maximum supported frequency value
504505 supplied to the ``CPUFreq `` core and exposed via the policy interface,
505506 but it affects the maximum possible value of per-policy P-state limits
506- (see ` Interpretation of Policy Attributes `_ below for details).
507+ (see :ref: ` policy_attributes_interpretation ` below for details).
507508
508509``hwp_dynamic_boost ``
509510 This attribute is only present if ``intel_pstate `` works in the
510- `active mode with the HWP feature enabled <Active Mode With HWP _>`_ in
511+ :ref: `active mode with the HWP feature enabled <active_mode_hwp >` in
511512 the processor. If set (equal to 1), it causes the minimum P-state limit
512513 to be increased dynamically for a short time whenever a task previously
513514 waiting on I/O is selected to run on a given logical CPU (the purpose
@@ -522,12 +523,12 @@ argument is passed to the kernel in the command line.
522523 Operation mode of the driver: "active", "passive" or "off".
523524
524525 "active"
525- The driver is functional and in the `active mode
526- <Active Mode_> `_ .
526+ The driver is functional and in the :ref: `active mode
527+ <active_mode>` .
527528
528529 "passive"
529- The driver is functional and in the `passive mode
530- <Passive Mode_> `_ .
530+ The driver is functional and in the :ref: `passive mode
531+ <passive_mode>` .
531532
532533 "off"
533534 The driver is not functional (it is not registered as a scaling
@@ -555,13 +556,15 @@ argument is passed to the kernel in the command line.
555556 attribute to "1" enables the energy-efficiency optimizations and setting
556557 to "0" disables them.
557558
559+ .. _policy_attributes_interpretation :
560+
558561Interpretation of Policy Attributes
559562-----------------------------------
560563
561564The interpretation of some ``CPUFreq `` policy attributes described in
562565Documentation/admin-guide/pm/cpufreq.rst is special with ``intel_pstate ``
563566as the current scaling driver and it generally depends on the driver's
564- `operation mode <Operation Modes _>`_ .
567+ :ref: `operation mode <operation_modes >` .
565568
566569First of all, the values of the ``cpuinfo_max_freq ``, ``cpuinfo_min_freq `` and
567570``scaling_cur_freq `` attributes are produced by applying a processor-specific
@@ -570,9 +573,10 @@ Also, the values of the ``scaling_max_freq`` and ``scaling_min_freq``
570573attributes are capped by the frequency corresponding to the maximum P-state that
571574the driver is allowed to set.
572575
573- If the ``no_turbo `` `global attribute <no_turbo_attr _>`_ is set, the driver is
574- not allowed to use turbo P-states, so the maximum value of ``scaling_max_freq ``
575- and ``scaling_min_freq `` is limited to the maximum non-turbo P-state frequency.
576+ If the ``no_turbo `` :ref: `global attribute <no_turbo_attr >` is set, the driver
577+ is not allowed to use turbo P-states, so the maximum value of
578+ ``scaling_max_freq `` and ``scaling_min_freq `` is limited to the maximum
579+ non-turbo P-state frequency.
576580Accordingly, setting ``no_turbo `` causes ``scaling_max_freq `` and
577581``scaling_min_freq `` to go down to that value if they were above it before.
578582However, the old values of ``scaling_max_freq `` and ``scaling_min_freq `` will be
@@ -584,7 +588,7 @@ and ``scaling_min_freq`` corresponds to the maximum supported turbo P-state,
584588which also is the value of ``cpuinfo_max_freq `` in either case.
585589
586590Next, the following policy attributes have special meaning if
587- ``intel_pstate `` works in the `active mode <Active Mode _>`_ :
591+ ``intel_pstate `` works in the :ref: `active mode <active_mode >` :
588592
589593``scaling_available_governors ``
590594 List of P-state selection algorithms provided by ``intel_pstate ``.
@@ -605,20 +609,22 @@ processor:
605609 Shows the base frequency of the CPU. Any frequency above this will be
606610 in the turbo frequency range.
607611
608- The meaning of these attributes in the `passive mode <Passive Mode _>`_ is the
612+ The meaning of these attributes in the :ref: `passive mode <passive_mode >` is the
609613same as for other scaling drivers.
610614
611615Additionally, the value of the ``scaling_driver `` attribute for ``intel_pstate ``
612616depends on the operation mode of the driver. Namely, it is either
613- "intel_pstate" (in the `active mode <Active Mode _>`_) or "intel_cpufreq" (in the
614- `passive mode <Passive Mode _>`_).
617+ "intel_pstate" (in the :ref: `active mode <active_mode >`) or "intel_cpufreq"
618+ (in the :ref: `passive mode <passive_mode >`).
619+
620+ .. _pstate_limits_coordination :
615621
616622Coordination of P-State Limits
617623------------------------------
618624
619625``intel_pstate `` allows P-state limits to be set in two ways: with the help of
620- the ``max_perf_pct `` and ``min_perf_pct `` `global attributes
621- <Global Attributes_> `_ or via the ``scaling_max_freq `` and ``scaling_min_freq ``
626+ the ``max_perf_pct `` and ``min_perf_pct `` :ref: `global attributes
627+ <global_attributes>` or via the ``scaling_max_freq `` and ``scaling_min_freq ``
622628``CPUFreq `` policy attributes. The coordination between those limits is based
623629on the following rules, regardless of the current operation mode of the driver:
624630
@@ -640,17 +646,18 @@ on the following rules, regardless of the current operation mode of the driver:
640646
641647 3. The global and per-policy limits can be set independently.
642648
643- In the `active mode with the HWP feature enabled <Active Mode With HWP _>`_ , the
649+ In the :ref: `active mode with the HWP feature enabled <active_mode_hwp >` , the
644650resulting effective values are written into hardware registers whenever the
645651limits change in order to request its internal P-state selection logic to always
646652set P-states within these limits. Otherwise, the limits are taken into account
647- by scaling governors (in the `passive mode <Passive Mode _>`_ ) and by the driver
648- every time before setting a new P-state for a CPU.
653+ by scaling governors (in the :ref: `passive mode <passive_mode >` ) and by the
654+ driver every time before setting a new P-state for a CPU.
649655
650656Additionally, if the ``intel_pstate=per_cpu_perf_limits `` command line argument
651657is passed to the kernel, ``max_perf_pct `` and ``min_perf_pct `` are not exposed
652658at all and the only way to set the limits is by using the policy attributes.
653659
660+ .. _energy_performance_hints :
654661
655662Energy vs Performance Hints
656663---------------------------
@@ -710,9 +717,9 @@ output.
710717On those systems each ``_PSS `` object returns a list of P-states supported by
711718the corresponding CPU which basically is a subset of the P-states range that can
712719be used by ``intel_pstate `` on the same system, with one exception: the whole
713- `turbo range <turbo _>`_ is represented by one item in it (the topmost one). By
714- convention, the frequency returned by ``_PSS `` for that item is greater by 1 MHz
715- than the frequency of the highest non-turbo P-state listed by it, but the
720+ :ref: `turbo range <turbo >` is represented by one item in it (the topmost one).
721+ By convention, the frequency returned by ``_PSS `` for that item is greater by
722+ 1 MHz than the frequency of the highest non-turbo P-state listed by it, but the
716723corresponding P-state representation (following the hardware specification)
717724returned for it matches the maximum supported turbo P-state (or is the
718725special value 255 meaning essentially "go as high as you can get").
@@ -738,18 +745,18 @@ benefit from running at turbo frequencies will be given non-turbo P-states
738745instead.
739746
740747One more issue related to that may appear on systems supporting the
741- `Configurable TDP feature <turbo _>`_ allowing the platform firmware to set the
742- turbo threshold. Namely, if that is not coordinated with the lists of P-states
743- returned by ``_PSS `` properly, there may be more than one item corresponding to
744- a turbo P-state in those lists and there may be a problem with avoiding the
745- turbo range (if desirable or necessary). Usually, to avoid using turbo
746- P-states overall, ``acpi-cpufreq `` simply avoids using the topmost state listed
747- by ``_PSS ``, but that is not sufficient when there are other turbo P-states in
748- the list returned by it.
748+ :ref: `Configurable TDP feature <turbo >` allowing the platform firmware to set
749+ the turbo threshold. Namely, if that is not coordinated with the lists of
750+ P-states returned by ``_PSS `` properly, there may be more than one item
751+ corresponding to a turbo P-state in those lists and there may be a problem with
752+ avoiding the turbo range (if desirable or necessary). Usually, to avoid using
753+ turbo P-states overall, ``acpi-cpufreq `` simply avoids using the topmost state
754+ listed by ``_PSS ``, but that is not sufficient when there are other turbo
755+ P-states in the list returned by it.
749756
750757Apart from the above, ``acpi-cpufreq `` works like ``intel_pstate `` in the
751- `passive mode <Passive Mode _>`_ , except that the number of P-states it can set
752- is limited to the ones listed by the ACPI ``_PSS `` objects.
758+ :ref: `passive mode <passive_mode >` , except that the number of P-states it can
759+ set is limited to the ones listed by the ACPI ``_PSS `` objects.
753760
754761
755762Kernel Command Line Options for ``intel_pstate ``
@@ -764,11 +771,11 @@ of them have to be prepended with the ``intel_pstate=`` prefix.
764771 processor is supported by it.
765772
766773``active ``
767- Register ``intel_pstate `` in the `active mode <Active Mode _>`_ to start
768- with.
774+ Register ``intel_pstate `` in the :ref: `active mode <active_mode >` to
775+ start with.
769776
770777``passive ``
771- Register ``intel_pstate `` in the `passive mode <Passive Mode _>`_ to
778+ Register ``intel_pstate `` in the :ref: `passive mode <passive_mode >` to
772779 start with.
773780
774781``force ``
@@ -801,12 +808,12 @@ of them have to be prepended with the ``intel_pstate=`` prefix.
801808 and this option has no effect.
802809
803810``per_cpu_perf_limits ``
804- Use per-logical-CPU P-State limits (see ` Coordination of P-state
805- Limits `_ for details).
811+ Use per-logical-CPU P-State limits (see
812+ :ref: ` pstate_limits_coordination ` for details).
806813
807814``no_cas ``
808- Do not enable `capacity-aware scheduling <CAS _>`_ which is enabled by
809- default on hybrid systems without SMT.
815+ Do not enable :ref: `capacity-aware scheduling <CAS >` which is enabled
816+ by default on hybrid systems without SMT.
810817
811818Diagnostics and Tuning
812819======================
@@ -818,7 +825,7 @@ There are two static trace events that can be used for ``intel_pstate``
818825diagnostics. One of them is the ``cpu_frequency `` trace event generally used
819826by ``CPUFreq ``, and the other one is the ``pstate_sample `` trace event specific
820827to ``intel_pstate ``. Both of them are triggered by ``intel_pstate `` only if
821- it works in the `active mode <Active Mode _>`_ .
828+ it works in the :ref: `active mode <active_mode >` .
822829
823830The following sequence of shell commands can be used to enable them and see
824831their output (if the kernel is generally configured to support event tracing)::
@@ -830,7 +837,7 @@ their output (if the kernel is generally configured to support event tracing)::
830837 gnome-terminal--4510 [001] ..s. 1177.680733: pstate_sample: core_busy=107 scaled=94 from=26 to=26 mperf=1143818 aperf=1230607 tsc=29838618 freq=2474476
831838 cat-5235 [002] ..s. 1177.681723: cpu_frequency: state=2900000 cpu_id=2
832839
833- If ``intel_pstate `` works in the `passive mode <Passive Mode _>`_ , the
840+ If ``intel_pstate `` works in the :ref: `passive mode <passive_mode >` , the
834841``cpu_frequency `` trace event will be triggered either by the ``schedutil ``
835842scaling governor (for the policies it is attached to), or by the ``CPUFreq ``
836843core (for the policies with other scaling governors).
0 commit comments