sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/admin-guide/pm/cpufreqmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/admin-guide/pm/cpufreqmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/admin-guide/pm/cpufreqmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/admin-guide/pm/cpufreqmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/admin-guide/pm/cpufreqmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/admin-guide/pm/cpufreqmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpufreq.rsthKubh)}(h4This data file has been placed in the public domain.h]h4This data file has been placed in the public domain.}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhho/srv/docbuild/lib/venvs/build-kernel-docs/lib64/python3.9/site-packages/docutils/parsers/rst/include/isonum.txthKubh)}(hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .h]hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubhsubstitution_definition)}(h*.. |amp| unicode:: U+00026 .. AMPERSANDh]h&}hhsbah}(h]h ]h"]ampah$]h&]uh1hhhhKhhhhubh)}(h+.. |apos| unicode:: U+00027 .. APOSTROPHEh]h'}hhsbah}(h]h ]h"]aposah$]h&]uh1hhhhKhhhhubh)}(h).. |ast| unicode:: U+0002A .. ASTERISKh]h*}hhsbah}(h]h ]h"]astah$]h&]uh1hhhhK hhhhubh)}(h+.. |brvbar| unicode:: U+000A6 .. BROKEN BARh]h¦}hjsbah}(h]h ]h"]brvbarah$]h&]uh1hhhhK hhhhubh)}(h0.. |bsol| unicode:: U+0005C .. REVERSE SOLIDUSh]h\}hjsbah}(h]h ]h"]bsolah$]h&]uh1hhhhK hhhhubh)}(h*.. |cent| unicode:: U+000A2 .. CENT SIGNh]h¢}hjsbah}(h]h ]h"]centah$]h&]uh1hhhhK hhhhubh)}(h&.. |colon| unicode:: U+0003A .. COLONh]h:}hj-sbah}(h]h ]h"]colonah$]h&]uh1hhhhK hhhhubh)}(h&.. |comma| unicode:: U+0002C .. COMMAh]h,}hj<sbah}(h]h ]h"]commaah$]h&]uh1hhhhKhhhhubh)}(h... |commat| unicode:: U+00040 .. COMMERCIAL ATh]h@}hjKsbah}(h]h ]h"]commatah$]h&]uh1hhhhKhhhhubh)}(h/.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGNh]h©}hjZsbah}(h]h ]h"]copyah$]h&]uh1hhhhKhhhhubh)}(h... |curren| unicode:: U+000A4 .. CURRENCY SIGNh]h¤}hjisbah}(h]h ]h"]currenah$]h&]uh1hhhhKhhhhubh)}(h0.. |darr| unicode:: U+02193 .. DOWNWARDS ARROWh]h↓}hjxsbah}(h]h ]h"]darrah$]h&]uh1hhhhKhhhhubh)}(h,.. |deg| unicode:: U+000B0 .. DEGREE SIGNh]h°}hjsbah}(h]h ]h"]degah$]h&]uh1hhhhKhhhhubh)}(h... |divide| unicode:: U+000F7 .. DIVISION SIGNh]h÷}hjsbah}(h]h ]h"]divideah$]h&]uh1hhhhKhhhhubh)}(h,.. |dollar| unicode:: U+00024 .. DOLLAR SIGNh]h$}hjsbah}(h]h ]h"]dollarah$]h&]uh1hhhhKhhhhubh)}(h,.. |equals| unicode:: U+0003D .. EQUALS SIGNh]h=}hjsbah}(h]h ]h"]equalsah$]h&]uh1hhhhKhhhhubh)}(h1.. |excl| unicode:: U+00021 .. EXCLAMATION MARKh]h!}hjsbah}(h]h ]h"]exclah$]h&]uh1hhhhKhhhhubh)}(h9.. |frac12| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjsbah}(h]h ]h"]frac12ah$]h&]uh1hhhhKhhhhubh)}(h<.. |frac14| unicode:: U+000BC .. VULGAR FRACTION ONE QUARTERh]h¼}hjsbah}(h]h ]h"]frac14ah$]h&]uh1hhhhKhhhhubh)}(h;.. |frac18| unicode:: U+0215B .. VULGAR FRACTION ONE EIGHTHh]h⅛}hjsbah}(h]h ]h"]frac18ah$]h&]uh1hhhhKhhhhubh)}(h?.. |frac34| unicode:: U+000BE .. VULGAR FRACTION THREE QUARTERSh]h¾}hjsbah}(h]h ]h"]frac34ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac38| unicode:: U+0215C .. VULGAR FRACTION THREE EIGHTHSh]h⅜}hjsbah}(h]h ]h"]frac38ah$]h&]uh1hhhhKhhhhubh)}(h=.. |frac58| unicode:: U+0215D .. VULGAR FRACTION FIVE EIGHTHSh]h⅝}hjsbah}(h]h ]h"]frac58ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac78| unicode:: U+0215E .. VULGAR FRACTION SEVEN EIGHTHSh]h⅞}hj,sbah}(h]h ]h"]frac78ah$]h&]uh1hhhhKhhhhubh)}(h2.. |gt| unicode:: U+0003E .. GREATER-THAN SIGNh]h>}hj;sbah}(h]h ]h"]gtah$]h&]uh1hhhhKhhhhubh)}(h9.. |half| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjJsbah}(h]h ]h"]halfah$]h&]uh1hhhhK hhhhubh)}(h/.. |horbar| unicode:: U+02015 .. HORIZONTAL BARh]h―}hjYsbah}(h]h ]h"]horbarah$]h&]uh1hhhhK!hhhhubh)}(h'.. |hyphen| unicode:: U+02010 .. HYPHENh]h‐}hjhsbah}(h]h ]h"]hyphenah$]h&]uh1hhhhK"hhhhubh)}(h:.. |iexcl| unicode:: U+000A1 .. INVERTED EXCLAMATION MARKh]h¡}hjwsbah}(h]h ]h"]iexclah$]h&]uh1hhhhK#hhhhubh)}(h7.. |iquest| unicode:: U+000BF .. INVERTED QUESTION MARKh]h¿}hjsbah}(h]h ]h"]iquestah$]h&]uh1hhhhK$hhhhubh)}(hJ.. |laquo| unicode:: U+000AB .. LEFT-POINTING DOUBLE ANGLE QUOTATION MARKh]h«}hjsbah}(h]h ]h"]laquoah$]h&]uh1hhhhK%hhhhubh)}(h0.. |larr| unicode:: U+02190 .. LEFTWARDS ARROWh]h←}hjsbah}(h]h ]h"]larrah$]h&]uh1hhhhK&hhhhubh)}(h3.. |lcub| unicode:: U+0007B .. LEFT CURLY BRACKETh]h{}hjsbah}(h]h ]h"]lcubah$]h&]uh1hhhhK'hhhhubh)}(h;.. |ldquo| unicode:: U+0201C .. LEFT DOUBLE QUOTATION MARKh]h“}hjsbah}(h]h ]h"]ldquoah$]h&]uh1hhhhK(hhhhubh)}(h).. |lowbar| unicode:: U+0005F .. LOW LINEh]h_}hjsbah}(h]h ]h"]lowbarah$]h&]uh1hhhhK)hhhhubh)}(h1.. |lpar| unicode:: U+00028 .. LEFT PARENTHESISh]h(}hjsbah}(h]h ]h"]lparah$]h&]uh1hhhhK*hhhhubh)}(h4.. |lsqb| unicode:: U+0005B .. LEFT SQUARE BRACKETh]h[}hjsbah}(h]h ]h"]lsqbah$]h&]uh1hhhhK+hhhhubh)}(h;.. |lsquo| unicode:: U+02018 .. LEFT SINGLE QUOTATION MARKh]h‘}hjsbah}(h]h ]h"]lsquoah$]h&]uh1hhhhK,hhhhubh)}(h/.. |lt| unicode:: U+0003C .. LESS-THAN SIGNh]h<}hj sbah}(h]h ]h"]ltah$]h&]uh1hhhhK-hhhhubh)}(h+.. |micro| unicode:: U+000B5 .. MICRO SIGNh]hµ}hjsbah}(h]h ]h"]microah$]h&]uh1hhhhK.hhhhubh)}(h+.. |middot| unicode:: U+000B7 .. MIDDLE DOTh]h·}hj+sbah}(h]h ]h"]middotah$]h&]uh1hhhhK/hhhhubh)}(h/.. |nbsp| unicode:: U+000A0 .. NO-BREAK SPACEh]h }hj:sbah}(h]h ]h"]nbspah$]h&]uh1hhhhK0hhhhubh)}(h).. |not| unicode:: U+000AC .. NOT SIGNh]h¬}hjIsbah}(h]h ]h"]notah$]h&]uh1hhhhK1hhhhubh)}(h,.. |num| unicode:: U+00023 .. NUMBER SIGNh]h#}hjXsbah}(h]h ]h"]numah$]h&]uh1hhhhK2hhhhubh)}(h).. |ohm| unicode:: U+02126 .. OHM SIGNh]hΩ}hjgsbah}(h]h ]h"]ohmah$]h&]uh1hhhhK3hhhhubh)}(h;.. |ordf| unicode:: U+000AA .. FEMININE ORDINAL INDICATORh]hª}hjvsbah}(h]h ]h"]ordfah$]h&]uh1hhhhK4hhhhubh)}(h<.. |ordm| unicode:: U+000BA .. MASCULINE ORDINAL INDICATORh]hº}hjsbah}(h]h ]h"]ordmah$]h&]uh1hhhhK5hhhhubh)}(h-.. |para| unicode:: U+000B6 .. PILCROW SIGNh]h¶}hjsbah}(h]h ]h"]paraah$]h&]uh1hhhhK6hhhhubh)}(h-.. |percnt| unicode:: U+00025 .. PERCENT SIGNh]h%}hjsbah}(h]h ]h"]percntah$]h&]uh1hhhhK7hhhhubh)}(h*.. |period| unicode:: U+0002E .. FULL STOPh]h.}hjsbah}(h]h ]h"]periodah$]h&]uh1hhhhK8hhhhubh)}(h*.. |plus| unicode:: U+0002B .. PLUS SIGNh]h+}hjsbah}(h]h ]h"]plusah$]h&]uh1hhhhK9hhhhubh)}(h0.. |plusmn| unicode:: U+000B1 .. PLUS-MINUS SIGNh]h±}hjsbah}(h]h ]h"]plusmnah$]h&]uh1hhhhK:hhhhubh)}(h+.. |pound| unicode:: U+000A3 .. POUND SIGNh]h£}hjsbah}(h]h ]h"]poundah$]h&]uh1hhhhK;hhhhubh)}(h... |quest| unicode:: U+0003F .. QUESTION MARKh]h?}hjsbah}(h]h ]h"]questah$]h&]uh1hhhhKhhhhubh)}(h1.. |rarr| unicode:: U+02192 .. RIGHTWARDS ARROWh]h→}hjsbah}(h]h ]h"]rarrah$]h&]uh1hhhhK?hhhhubh)}(h4.. |rcub| unicode:: U+0007D .. RIGHT CURLY BRACKETh]h}}hj*sbah}(h]h ]h"]rcubah$]h&]uh1hhhhK@hhhhubh)}(h<.. |rdquo| unicode:: U+0201D .. RIGHT DOUBLE QUOTATION MARKh]h”}hj9sbah}(h]h ]h"]rdquoah$]h&]uh1hhhhKAhhhhubh)}(h0.. |reg| unicode:: U+000AE .. REGISTERED SIGNh]h®}hjHsbah}(h]h ]h"]regah$]h&]uh1hhhhKBhhhhubh)}(h2.. |rpar| unicode:: U+00029 .. RIGHT PARENTHESISh]h)}hjWsbah}(h]h ]h"]rparah$]h&]uh1hhhhKChhhhubh)}(h5.. |rsqb| unicode:: U+0005D .. RIGHT SQUARE BRACKETh]h]}hjfsbah}(h]h ]h"]rsqbah$]h&]uh1hhhhKDhhhhubh)}(h<.. |rsquo| unicode:: U+02019 .. RIGHT SINGLE QUOTATION MARKh]h’}hjusbah}(h]h ]h"]rsquoah$]h&]uh1hhhhKEhhhhubh)}(h-.. |sect| unicode:: U+000A7 .. SECTION SIGNh]h§}hjsbah}(h]h ]h"]sectah$]h&]uh1hhhhKFhhhhubh)}(h*.. |semi| unicode:: U+0003B .. SEMICOLONh]h;}hjsbah}(h]h ]h"]semiah$]h&]uh1hhhhKGhhhhubh)}(h,.. |shy| unicode:: U+000AD .. SOFT HYPHENh]h­}hjsbah}(h]h ]h"]shyah$]h&]uh1hhhhKHhhhhubh)}(h(.. |sol| unicode:: U+0002F .. SOLIDUSh]h/}hjsbah}(h]h ]h"]solah$]h&]uh1hhhhKIhhhhubh)}(h,.. |sung| unicode:: U+0266A .. EIGHTH NOTEh]h♪}hjsbah}(h]h ]h"]sungah$]h&]uh1hhhhKJhhhhubh)}(h0.. |sup1| unicode:: U+000B9 .. SUPERSCRIPT ONEh]h¹}hjsbah}(h]h ]h"]sup1ah$]h&]uh1hhhhKKhhhhubh)}(h0.. |sup2| unicode:: U+000B2 .. SUPERSCRIPT TWOh]h²}hjsbah}(h]h ]h"]sup2ah$]h&]uh1hhhhKLhhhhubh)}(h2.. |sup3| unicode:: U+000B3 .. SUPERSCRIPT THREEh]h³}hjsbah}(h]h ]h"]sup3ah$]h&]uh1hhhhKMhhhhubh)}(h4.. |times| unicode:: U+000D7 .. MULTIPLICATION SIGNh]h×}hjsbah}(h]h ]h"]timesah$]h&]uh1hhhhKNhhhhubh)}(h0.. |trade| unicode:: U+02122 .. TRADE MARK SIGNh]h™}hj sbah}(h]h ]h"]tradeah$]h&]uh1hhhhKOhhhhubh)}(h... |uarr| unicode:: U+02191 .. UPWARDS ARROWh]h↑}hjsbah}(h]h ]h"]uarrah$]h&]uh1hhhhKPhhhhubh)}(h... |verbar| unicode:: U+0007C .. VERTICAL LINEh]h|}hj)sbah}(h]h ]h"]verbarah$]h&]uh1hhhhKQhhhhubh)}(h*.. |yen| unicode:: U+000A5 .. YEN SIGN h]h¥}hj8sbah}(h]h ]h"]yenah$]h&]uh1hhhhKRhhhhubh)}(h?.. |intel_pstate| replace:: :doc:`intel_pstate ` h]h)}(h":doc:`intel_pstate `h]hinline)}(hjMh]h intel_pstate}(hjQhhhNhNubah}(h]h ](xrefstdstd-doceh"]h$]h&]uh1jOhjKubah}(h]h ]h"]h$]h&]refdocadmin-guide/pm/cpufreq refdomainj\reftypedoc refexplicitrefwarn reftarget intel_pstateuh1hhhhKhjGubah}(h]h ]h"] intel_pstateah$]h&]uh1hhhhKhhhhubhsection)}(hhh](htitle)}(hCPU Performance Scalingh]hCPU Performance Scaling}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjyhhhhhKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(h Copyrighth]h Copyright}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubh field_body)}(h|copy| 2017 Intel Corporation h]h paragraph)}(h|copy| 2017 Intel Corporationh](h©}(hjhhhNhNubh 2017 Intel Corporation}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK hjhhubj)}(hhh](j)}(hAuthorh]hAuthor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(h0Rafael J. Wysocki h]j)}(h.Rafael J. Wysocki h](hRafael J. Wysocki <}(hjhhhNhNubh reference)}(hrafael.j.wysocki@intel.comh]hrafael.j.wysocki@intel.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri!mailto:rafael.j.wysocki@intel.comuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK hjhhubeh}(h]h ]h"]h$]h&]uh1jhjyhhhhhK ubjx)}(hhh](j})}(h&The Concept of CPU Performance Scalingh]h&The Concept of CPU Performance Scaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhKubj)}(hXThe majority of modern processors are capable of operating in a number of different clock frequency and voltage configurations, often referred to as Operating Performance Points or P-states (in ACPI terminology). As a rule, the higher the clock frequency and the higher the voltage, the more instructions can be retired by the CPU over a unit of time, but also the higher the clock frequency and the higher the voltage, the more energy is consumed over a unit of time (or the more power is drawn) by the CPU in the given P-state. Therefore there is a natural tradeoff between the CPU capacity (the number of instructions that can be executed over a unit of time) and the power drawn by the CPU.h]hXThe majority of modern processors are capable of operating in a number of different clock frequency and voltage configurations, often referred to as Operating Performance Points or P-states (in ACPI terminology). As a rule, the higher the clock frequency and the higher the voltage, the more instructions can be retired by the CPU over a unit of time, but also the higher the clock frequency and the higher the voltage, the more energy is consumed over a unit of time (or the more power is drawn) by the CPU in the given P-state. Therefore there is a natural tradeoff between the CPU capacity (the number of instructions that can be executed over a unit of time) and the power drawn by the CPU.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX*In some situations it is desirable or even necessary to run the program as fast as possible and then there is no reason to use any P-states different from the highest one (i.e. the highest-performance frequency/voltage configuration available). In some other cases, however, it may not be necessary to execute instructions so quickly and maintaining the highest available CPU capacity for a relatively long time without utilizing it entirely may be regarded as wasteful. It also may not be physically possible to maintain maximum CPU capacity for too long for thermal or power supply capacity reasons or similar. To cover those cases, there are hardware interfaces allowing CPUs to be switched between different frequency/voltage configurations or (in the ACPI terminology) to be put into different P-states.h]hX*In some situations it is desirable or even necessary to run the program as fast as possible and then there is no reason to use any P-states different from the highest one (i.e. the highest-performance frequency/voltage configuration available). In some other cases, however, it may not be necessary to execute instructions so quickly and maintaining the highest available CPU capacity for a relatively long time without utilizing it entirely may be regarded as wasteful. It also may not be physically possible to maintain maximum CPU capacity for too long for thermal or power supply capacity reasons or similar. To cover those cases, there are hardware interfaces allowing CPUs to be switched between different frequency/voltage configurations or (in the ACPI terminology) to be put into different P-states.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXTypically, they are used along with algorithms to estimate the required CPU capacity, so as to decide which P-states to put the CPUs into. Of course, since the utilization of the system generally changes over time, that has to be done repeatedly on a regular basis. The activity by which this happens is referred to as CPU performance scaling or CPU frequency scaling (because it involves adjusting the CPU clock frequency).h]hXTypically, they are used along with algorithms to estimate the required CPU capacity, so as to decide which P-states to put the CPUs into. Of course, since the utilization of the system generally changes over time, that has to be done repeatedly on a regular basis. The activity by which this happens is referred to as CPU performance scaling or CPU frequency scaling (because it involves adjusting the CPU clock frequency).}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK(hjhhubeh}(h]&the-concept-of-cpu-performance-scalingah ]h"]&the concept of cpu performance scalingah$]h&]uh1jwhjyhhhhhKubjx)}(hhh](j})}(h CPU Performance Scaling in Linuxh]h CPU Performance Scaling in Linux}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjZhhhhhK1ubj)}(hThe Linux kernel supports CPU performance scaling by means of the ``CPUFreq`` (CPU Frequency scaling) subsystem that consists of three layers of code: the core, scaling governors and scaling drivers.h](hBThe Linux kernel supports CPU performance scaling by means of the }(hjkhhhNhNubhliteral)}(h ``CPUFreq``h]hCPUFreq}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjkubhz (CPU Frequency scaling) subsystem that consists of three layers of code: the core, scaling governors and scaling drivers.}(hjkhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK3hjZhhubj)}(hThe ``CPUFreq`` core provides the common code infrastructure and user space interfaces for all platforms that support CPU performance scaling. It defines the basic framework in which the other components operate.h](hThe }(hjhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh core provides the common code infrastructure and user space interfaces for all platforms that support CPU performance scaling. It defines the basic framework in which the other components operate.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK7hjZhhubj)}(hScaling governors implement algorithms to estimate the required CPU capacity. As a rule, each governor implements one, possibly parametrized, scaling algorithm.h]hScaling governors implement algorithms to estimate the required CPU capacity. As a rule, each governor implements one, possibly parametrized, scaling algorithm.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK;hjZhhubj)}(hScaling drivers talk to the hardware. They provide scaling governors with information on the available P-states (or P-state ranges in some cases) and access platform-specific hardware interfaces to change CPU P-states as requested by scaling governors.h]hScaling drivers talk to the hardware. They provide scaling governors with information on the available P-states (or P-state ranges in some cases) and access platform-specific hardware interfaces to change CPU P-states as requested by scaling governors.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK?hjZhhubj)}(hXIn principle, all available scaling governors can be used with every scaling driver. That design is based on the observation that the information used by performance scaling algorithms for P-state selection can be represented in a platform-independent form in the majority of cases, so it should be possible to use the same performance scaling algorithm implemented in exactly the same way regardless of which scaling driver is used. Consequently, the same set of scaling governors should be suitable for every supported platform.h]hXIn principle, all available scaling governors can be used with every scaling driver. That design is based on the observation that the information used by performance scaling algorithms for P-state selection can be represented in a platform-independent form in the majority of cases, so it should be possible to use the same performance scaling algorithm implemented in exactly the same way regardless of which scaling driver is used. Consequently, the same set of scaling governors should be suitable for every supported platform.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKDhjZhhubj)}(hXHowever, that observation may not hold for performance scaling algorithms based on information provided by the hardware itself, for example through feedback registers, as that information is typically specific to the hardware interface it comes from and may not be easily represented in an abstract, platform-independent way. For this reason, ``CPUFreq`` allows scaling drivers to bypass the governor layer and implement their own performance scaling algorithms. That is done by the |intel_pstate| scaling driver.h](hXXHowever, that observation may not hold for performance scaling algorithms based on information provided by the hardware itself, for example through feedback registers, as that information is typically specific to the hardware interface it comes from and may not be easily represented in an abstract, platform-independent way. For this reason, }(hjhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh allows scaling drivers to bypass the governor layer and implement their own performance scaling algorithms. That is done by the }(hjhhhNhNubh)}(hjMh]jP)}(hjMh]h intel_pstate}(hjhhhNhNubah}(h]h ](j[j\j]eh"]h$]h&]uh1jOhNhNhjubah}(h]h ]h"]h$]h&]refdocjh refdomainj\reftypejk refexplicitrefwarn reftargetjouh1hhhhKhjhhubh scaling driver.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKLhjZhhubeh}(h] cpu-performance-scaling-in-linuxah ]h"] cpu performance scaling in linuxah$]h&]uh1jwhjyhhhhhK1ubjx)}(hhh](j})}(h``CPUFreq`` Policy Objectsh](jt)}(h ``CPUFreq``h]hCPUFreq}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj"ubh Policy Objects}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hjhhhhhKVubj)}(hXIn some cases the hardware interface for P-state control is shared by multiple CPUs. That is, for example, the same register (or set of registers) is used to control the P-state of multiple CPUs at the same time and writing to it affects all of those CPUs simultaneously.h]hXIn some cases the hardware interface for P-state control is shared by multiple CPUs. That is, for example, the same register (or set of registers) is used to control the P-state of multiple CPUs at the same time and writing to it affects all of those CPUs simultaneously.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKXhjhhubj)}(hSets of CPUs sharing hardware P-state control interfaces are represented by ``CPUFreq`` as struct cpufreq_policy objects. For consistency, struct cpufreq_policy is also used when there is only one CPU in the given set.h](hLSets of CPUs sharing hardware P-state control interfaces are represented by }(hjLhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jshjLubh as struct cpufreq_policy objects. For consistency, struct cpufreq_policy is also used when there is only one CPU in the given set.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK]hjhhubj)}(hX1The ``CPUFreq`` core maintains a pointer to a struct cpufreq_policy object for every CPU in the system, including CPUs that are currently offline. If multiple CPUs share the same hardware P-state control interface, all of the pointers corresponding to them point to the same struct cpufreq_policy object.h](hThe }(hjlhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jshjlubhX" core maintains a pointer to a struct cpufreq_policy object for every CPU in the system, including CPUs that are currently offline. If multiple CPUs share the same hardware P-state control interface, all of the pointers corresponding to them point to the same struct cpufreq_policy object.}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKbhjhhubj)}(h``CPUFreq`` uses struct cpufreq_policy as its basic data type and the design of its user space interface is based on the policy concept.h](jt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh} uses struct cpufreq_policy as its basic data type and the design of its user space interface is based on the policy concept.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKghjhhubeh}(h]cpufreq-policy-objectsah ]h"]cpufreq policy objectsah$]h&]uh1jwhjyhhhhhKVubjx)}(hhh](j})}(hCPU Initializationh]hCPU Initialization}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhKlubj)}(hFirst of all, a scaling driver has to be registered for ``CPUFreq`` to work. It is only possible to register one scaling driver at a time, so the scaling driver is expected to be able to handle all CPUs in the system.h](h8First of all, a scaling driver has to be registered for }(hjhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh to work. It is only possible to register one scaling driver at a time, so the scaling driver is expected to be able to handle all CPUs in the system.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKnhjhhubj)}(hXThe scaling driver may be registered before or after CPU registration. If CPUs are registered earlier, the driver core invokes the ``CPUFreq`` core to take a note of all of the already registered CPUs during the registration of the scaling driver. In turn, if any CPUs are registered after the registration of the scaling driver, the ``CPUFreq`` core will be invoked to take note of them at their registration time.h](hThe scaling driver may be registered before or after CPU registration. If CPUs are registered earlier, the driver core invokes the }(hjhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh core to take a note of all of the already registered CPUs during the registration of the scaling driver. In turn, if any CPUs are registered after the registration of the scaling driver, the }(hjhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhF core will be invoked to take note of them at their registration time.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKrhjhhubj)}(hXIn any case, the ``CPUFreq`` core is invoked to take note of any logical CPU it has not seen so far as soon as it is ready to handle that CPU. [Note that the logical CPU may be a physical single-core processor, or a single core in a multicore processor, or a hardware thread in a physical processor or processor core. In what follows "CPU" always means "logical CPU" unless explicitly stated otherwise and the word "processor" is used to refer to the physical part possibly including multiple logical CPUs.]h](hIn any case, the }(hjhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhX core is invoked to take note of any logical CPU it has not seen so far as soon as it is ready to handle that CPU. [Note that the logical CPU may be a physical single-core processor, or a single core in a multicore processor, or a hardware thread in a physical processor or processor core. In what follows “CPU” always means “logical CPU” unless explicitly stated otherwise and the word “processor” is used to refer to the physical part possibly including multiple logical CPUs.]}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKyhjhhubj)}(hX{Once invoked, the ``CPUFreq`` core checks if the policy pointer is already set for the given CPU and if so, it skips the policy object creation. Otherwise, a new policy object is created and initialized, which involves the creation of a new policy directory in ``sysfs``, and the policy pointer corresponding to the given CPU is set to the new policy object's address in memory.h](hOnce invoked, the }(hj3hhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj3ubh core checks if the policy pointer is already set for the given CPU and if so, it skips the policy object creation. Otherwise, a new policy object is created and initialized, which involves the creation of a new policy directory in }(hj3hhhNhNubjt)}(h ``sysfs``h]hsysfs}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jshj3ubhn, and the policy pointer corresponding to the given CPU is set to the new policy object’s address in memory.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXNext, the scaling driver's ``->init()`` callback is invoked with the policy pointer of the new CPU passed to it as the argument. That callback is expected to initialize the performance scaling hardware interface for the given CPU (or, more precisely, for the set of CPUs sharing the hardware interface it belongs to, represented by its policy object) and, if the policy object it has been called for is new, to set parameters of the policy, like the minimum and maximum frequencies supported by the hardware, the table of available frequencies (if the set of supported P-states is not a continuous range), and the mask of CPUs that belong to the same policy (including both online and offline CPUs). That mask is then used by the core to populate the policy pointers for all of the CPUs in it.h](hNext, the scaling driver’s }(hjehhhNhNubjt)}(h ``->init()``h]h->init()}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjeubhX callback is invoked with the policy pointer of the new CPU passed to it as the argument. That callback is expected to initialize the performance scaling hardware interface for the given CPU (or, more precisely, for the set of CPUs sharing the hardware interface it belongs to, represented by its policy object) and, if the policy object it has been called for is new, to set parameters of the policy, like the minimum and maximum frequencies supported by the hardware, the table of available frequencies (if the set of supported P-states is not a continuous range), and the mask of CPUs that belong to the same policy (including both online and offline CPUs). That mask is then used by the core to populate the policy pointers for all of the CPUs in it.}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX9The next major initialization step for a new policy object is to attach a scaling governor to it (to begin with, that is the default scaling governor determined by the kernel command line or configuration, but it may be changed later via ``sysfs``). First, a pointer to the new policy object is passed to the governor's ``->init()`` callback which is expected to initialize all of the data structures necessary to handle the given policy and, possibly, to add a governor ``sysfs`` interface to it. Next, the governor is started by invoking its ``->start()`` callback.h](hThe next major initialization step for a new policy object is to attach a scaling governor to it (to begin with, that is the default scaling governor determined by the kernel command line or configuration, but it may be changed later via }(hjhhhNhNubjt)}(h ``sysfs``h]hsysfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhL). First, a pointer to the new policy object is passed to the governor’s }(hjhhhNhNubjt)}(h ``->init()``h]h->init()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh callback which is expected to initialize all of the data structures necessary to handle the given policy and, possibly, to add a governor }(hjhhhNhNubjt)}(h ``sysfs``h]hsysfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhA interface to it. Next, the governor is started by invoking its }(hjhhhNhNubjt)}(h ``->start()``h]h ->start()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh callback.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXIThat callback is expected to register per-CPU utilization update callbacks for all of the online CPUs belonging to the given policy with the CPU scheduler. The utilization update callbacks will be invoked by the CPU scheduler on important events, like task enqueue and dequeue, on every iteration of the scheduler tick or generally whenever the CPU utilization may change (from the scheduler's perspective). They are expected to carry out computations needed to determine the P-state to use for the given policy going forward and to invoke the scaling driver to make changes to the hardware in accordance with the P-state selection. The scaling driver may be invoked directly from scheduler context or asynchronously, via a kernel thread or workqueue, depending on the configuration and capabilities of the scaling driver and the governor.h]hXKThat callback is expected to register per-CPU utilization update callbacks for all of the online CPUs belonging to the given policy with the CPU scheduler. The utilization update callbacks will be invoked by the CPU scheduler on important events, like task enqueue and dequeue, on every iteration of the scheduler tick or generally whenever the CPU utilization may change (from the scheduler’s perspective). They are expected to carry out computations needed to determine the P-state to use for the given policy going forward and to invoke the scaling driver to make changes to the hardware in accordance with the P-state selection. The scaling driver may be invoked directly from scheduler context or asynchronously, via a kernel thread or workqueue, depending on the configuration and capabilities of the scaling driver and the governor.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXSimilar steps are taken for policy objects that are not new, but were "inactive" previously, meaning that all of the CPUs belonging to them were offline. The only practical difference in that case is that the ``CPUFreq`` core will attempt to use the scaling governor previously used with the policy that became "inactive" (and is re-initialized now) instead of the default governor.h](hSimilar steps are taken for policy objects that are not new, but were “inactive” previously, meaning that all of the CPUs belonging to them were offline. The only practical difference in that case is that the }(hjhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh core will attempt to use the scaling governor previously used with the policy that became “inactive” (and is re-initialized now) instead of the default governor.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXIn turn, if a previously offline CPU is being brought back online, but some other CPUs sharing the policy object with it are online already, there is no need to re-initialize the policy object at all. In that case, it only is necessary to restart the scaling governor so that it can take the new online CPU into account. That is achieved by invoking the governor's ``->stop`` and ``->start()`` callbacks, in this order, for the entire policy.h](hXqIn turn, if a previously offline CPU is being brought back online, but some other CPUs sharing the policy object with it are online already, there is no need to re-initialize the policy object at all. In that case, it only is necessary to restart the scaling governor so that it can take the new online CPU into account. That is achieved by invoking the governor’s }(hj hhhNhNubjt)}(h ``->stop``h]h->stop}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubh and }(hj hhhNhNubjt)}(h ``->start()``h]h ->start()}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubh1 callbacks, in this order, for the entire policy.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXtAs mentioned before, the |intel_pstate| scaling driver bypasses the scaling governor layer of ``CPUFreq`` and provides its own P-state selection algorithms. Consequently, if |intel_pstate| is used, scaling governors are not attached to new policy objects. Instead, the driver's ``->setpolicy()`` callback is invoked to register per-CPU utilization update callbacks for each policy. These callbacks are invoked by the CPU scheduler in the same way as for scaling governors, but in the |intel_pstate| case they both determine the P-state to use and change the hardware configuration accordingly in one go from scheduler context.h](hAs mentioned before, the }(hj; hhhNhNubh)}(hjMh]jP)}(hjMh]h intel_pstate}(hjF hhhNhNubah}(h]h ](j[j\j]eh"]h$]h&]uh1jOhNhNhjC ubah}(h]h ]h"]h$]h&]refdocjh refdomainj\reftypejk refexplicitrefwarn reftargetjouh1hhhhKhj; hhubh7 scaling driver bypasses the scaling governor layer of }(hj; hhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj; ubhE and provides its own P-state selection algorithms. Consequently, if }(hj; hhhNhNubh)}(hjMh]jP)}(hjMh]h intel_pstate}(hjx hhhNhNubah}(h]h ](j[j\j]eh"]h$]h&]uh1jOhNhNhju ubah}(h]h ]h"]h$]h&]refdocjh refdomainj\reftypejk refexplicitrefwarn reftargetjouh1hhhhKhj; hhubh] is used, scaling governors are not attached to new policy objects. Instead, the driver’s }(hj; hhhNhNubjt)}(h``->setpolicy()``h]h ->setpolicy()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj; ubh callback is invoked to register per-CPU utilization update callbacks for each policy. These callbacks are invoked by the CPU scheduler in the same way as for scaling governors, but in the }(hj; hhhNhNubh)}(hjMh]jP)}(hjMh]h intel_pstate}(hj hhhNhNubah}(h]h ](j[j\j]eh"]h$]h&]uh1jOhNhNhj ubah}(h]h ]h"]h$]h&]refdocjh refdomainj\reftypejk refexplicitrefwarn reftargetjouh1hhhhKhj; hhubh case they both determine the P-state to use and change the hardware configuration accordingly in one go from scheduler context.}(hj; hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX+The policy objects created during CPU initialization and other data structures associated with them are torn down when the scaling driver is unregistered (which happens when the kernel module containing it is unloaded, for example) or when the last CPU belonging to the given policy in unregistered.h]hX+The policy objects created during CPU initialization and other data structures associated with them are torn down when the scaling driver is unregistered (which happens when the kernel module containing it is unloaded, for example) or when the last CPU belonging to the given policy in unregistered.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]cpu-initializationah ]h"]cpu initializationah$]h&]uh1jwhjyhhhhhKlubjx)}(hhh](j})}(hPolicy Interface in ``sysfs``h](hPolicy Interface in }(hj hhhNhNubjt)}(h ``sysfs``h]hsysfs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubeh}(h]h ]h"]h$]h&]uh1j|hj hhhhhKubj)}(hDuring the initialization of the kernel, the ``CPUFreq`` core creates a ``sysfs`` directory (kobject) called ``cpufreq`` under :file:`/sys/devices/system/cpu/`.h](h-During the initialization of the kernel, the }(hj hhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubh core creates a }(hj hhhNhNubjt)}(h ``sysfs``h]hsysfs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubh directory (kobject) called }(hj hhhNhNubjt)}(h ``cpufreq``h]hcpufreq}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubh under }(hj hhhNhNubjt)}(h :file:`/sys/devices/system/cpu/`h]h/sys/devices/system/cpu/}(hj@ hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jshj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj hhubj)}(hXThat directory contains a ``policyX`` subdirectory (where ``X`` represents an integer number) for every policy object maintained by the ``CPUFreq`` core. Each ``policyX`` directory is pointed to by ``cpufreq`` symbolic links under :file:`/sys/devices/system/cpu/cpuY/` (where ``Y`` represents an integer that may be different from the one represented by ``X``) for all of the CPUs associated with (or belonging to) the given policy. The ``policyX`` directories in :file:`/sys/devices/system/cpu/cpufreq` each contain policy-specific attributes (files) to control ``CPUFreq`` behavior for the corresponding policy objects (that is, for all of the CPUs associated with them).h](hThat directory contains a }(hj[ hhhNhNubjt)}(h ``policyX``h]hpolicyX}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubh subdirectory (where }(hj[ hhhNhNubjt)}(h``X``h]hX}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubhI represents an integer number) for every policy object maintained by the }(hj[ hhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubh core. Each }(hj[ hhhNhNubjt)}(h ``policyX``h]hpolicyX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubh directory is pointed to by }(hj[ hhhNhNubjt)}(h ``cpufreq``h]hcpufreq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubh symbolic links under }(hj[ hhhNhNubjt)}(h%:file:`/sys/devices/system/cpu/cpuY/`h]h/sys/devices/system/cpu/cpuY/}(hj hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jshj[ ubh (where }(hj[ hhhNhNubjt)}(h``Y``h]hY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubhI represents an integer that may be different from the one represented by }(hj[ hhhNhNubjt)}(h``X``h]hX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubhO) for all of the CPUs associated with (or belonging to) the given policy. The }(hj[ hhhNhNubjt)}(h ``policyX``h]hpolicyX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubh directories in }(hj[ hhhNhNubjt)}(h':file:`/sys/devices/system/cpu/cpufreq`h]h/sys/devices/system/cpu/cpufreq}(hj hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jshj[ ubh< each contain policy-specific attributes (files) to control }(hj[ hhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj[ ubhc behavior for the corresponding policy objects (that is, for all of the CPUs associated with them).}(hj[ hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj hhubj)}(hXpSome of those attributes are generic. They are created by the ``CPUFreq`` core and their behavior generally does not depend on what scaling driver is in use and what scaling governor is attached to the given policy. Some scaling drivers also add driver-specific attributes to the policy directories in ``sysfs`` to control policy-specific aspects of driver behavior.h](h?Some of those attributes are generic. They are created by the }(hj5 hhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hj= hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj5 ubh core and their behavior generally does not depend on what scaling driver is in use and what scaling governor is attached to the given policy. Some scaling drivers also add driver-specific attributes to the policy directories in }(hj5 hhhNhNubjt)}(h ``sysfs``h]hsysfs}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj5 ubh7 to control policy-specific aspects of driver behavior.}(hj5 hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj hhubj)}(h`The generic attributes under :file:`/sys/devices/system/cpu/cpufreq/policyX/` are the following:h](hThe generic attributes under }(hjg hhhNhNubjt)}(h0:file:`/sys/devices/system/cpu/cpufreq/policyX/`h]h(/sys/devices/system/cpu/cpufreq/policyX/}(hjo hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jshjg ubh are the following:}(hjg hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj hhubhdefinition_list)}(hhh](hdefinition_list_item)}(h``affected_cpus`` List of online CPUs belonging to this policy (i.e. sharing the hardware performance scaling interface represented by the ``policyX`` policy object). h](hterm)}(h``affected_cpus``h]jt)}(hj h]h affected_cpus}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubah}(h]h ]h"]h$]h&]uh1j hhhKhj ubh definition)}(hhh]j)}(hList of online CPUs belonging to this policy (i.e. sharing the hardware performance scaling interface represented by the ``policyX`` policy object).h](hyList of online CPUs belonging to this policy (i.e. sharing the hardware performance scaling interface represented by the }(hj hhhNhNubjt)}(h ``policyX``h]hpolicyX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubh policy object).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj ubj )}(hX ``bios_limit`` If the platform firmware (BIOS) tells the OS to apply an upper limit to CPU frequencies, that limit will be reported through this attribute (if present). The existence of the limit may be a result of some (often unintentional) BIOS settings, restrictions coming from a service processor or another BIOS/HW-based mechanisms. This does not cover ACPI thermal limitations which can be discovered through a generic thermal driver. This attribute is not present if the scaling driver in use does not support it. h](j )}(h``bios_limit``h]jt)}(hj h]h bios_limit}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubah}(h]h ]h"]h$]h&]uh1j hhhKhj ubj )}(hhh](j)}(hIf the platform firmware (BIOS) tells the OS to apply an upper limit to CPU frequencies, that limit will be reported through this attribute (if present).h]hIf the platform firmware (BIOS) tells the OS to apply an upper limit to CPU frequencies, that limit will be reported through this attribute (if present).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hThe existence of the limit may be a result of some (often unintentional) BIOS settings, restrictions coming from a service processor or another BIOS/HW-based mechanisms.h]hThe existence of the limit may be a result of some (often unintentional) BIOS settings, restrictions coming from a service processor or another BIOS/HW-based mechanisms.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hfThis does not cover ACPI thermal limitations which can be discovered through a generic thermal driver.h]hfThis does not cover ACPI thermal limitations which can be discovered through a generic thermal driver.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hOThis attribute is not present if the scaling driver in use does not support it.h]hOThis attribute is not present if the scaling driver in use does not support it.}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj hhubj )}(hX``cpuinfo_cur_freq`` Current frequency of the CPUs belonging to this policy as obtained from the hardware (in KHz). This is expected to be the frequency the hardware actually runs at. If that frequency cannot be determined, this attribute should not be present. h](j )}(h``cpuinfo_cur_freq``h]jt)}(hjG h]hcpuinfo_cur_freq}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjE ubah}(h]h ]h"]h$]h&]uh1j hhhKhjA ubj )}(hhh](j)}(h^Current frequency of the CPUs belonging to this policy as obtained from the hardware (in KHz).h]h^Current frequency of the CPUs belonging to this policy as obtained from the hardware (in KHz).}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj\ ubj)}(hThis is expected to be the frequency the hardware actually runs at. If that frequency cannot be determined, this attribute should not be present.h]hThis is expected to be the frequency the hardware actually runs at. If that frequency cannot be determined, this attribute should not be present.}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj\ ubeh}(h]h ]h"]h$]h&]uh1j hjA ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj hhubj )}(hXW``cpuinfo_avg_freq`` An average frequency (in KHz) of all CPUs belonging to a given policy, derived from a hardware provided feedback and reported on a time frame spanning at most few milliseconds. This is expected to be based on the frequency the hardware actually runs at and, as such, might require specialised hardware support (such as AMU extension on ARM). If one cannot be determined, this attribute should not be present. Note, that failed attempt to retrieve current frequency for a given CPU(s) will result in an appropriate error, i.e: EAGAIN for CPU that remains idle (raised on ARM). h](j )}(h``cpuinfo_avg_freq``h]jt)}(hj h]hcpuinfo_avg_freq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubah}(h]h ]h"]h$]h&]uh1j hhhMhj ubj )}(hhh](j)}(hAn average frequency (in KHz) of all CPUs belonging to a given policy, derived from a hardware provided feedback and reported on a time frame spanning at most few milliseconds.h]hAn average frequency (in KHz) of all CPUs belonging to a given policy, derived from a hardware provided feedback and reported on a time frame spanning at most few milliseconds.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hThis is expected to be based on the frequency the hardware actually runs at and, as such, might require specialised hardware support (such as AMU extension on ARM). If one cannot be determined, this attribute should not be present.h]hThis is expected to be based on the frequency the hardware actually runs at and, as such, might require specialised hardware support (such as AMU extension on ARM). If one cannot be determined, this attribute should not be present.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hNote, that failed attempt to retrieve current frequency for a given CPU(s) will result in an appropriate error, i.e: EAGAIN for CPU that remains idle (raised on ARM).h]hNote, that failed attempt to retrieve current frequency for a given CPU(s) will result in an appropriate error, i.e: EAGAIN for CPU that remains idle (raised on ARM).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubj )}(hq``cpuinfo_max_freq`` Maximum possible operating frequency the CPUs belonging to this policy can run at (in kHz). h](j )}(h``cpuinfo_max_freq``h]jt)}(hj h]hcpuinfo_max_freq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubah}(h]h ]h"]h$]h&]uh1j hhhM hj ubj )}(hhh]j)}(h[Maximum possible operating frequency the CPUs belonging to this policy can run at (in kHz).h]h[Maximum possible operating frequency the CPUs belonging to this policy can run at (in kHz).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhM hj hhubj )}(hq``cpuinfo_min_freq`` Minimum possible operating frequency the CPUs belonging to this policy can run at (in kHz). h](j )}(h``cpuinfo_min_freq``h]jt)}(hj h]hcpuinfo_min_freq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubah}(h]h ]h"]h$]h&]uh1j hhhMhj ubj )}(hhh]j)}(h[Minimum possible operating frequency the CPUs belonging to this policy can run at (in kHz).h]h[Minimum possible operating frequency the CPUs belonging to this policy can run at (in kHz).}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj. ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubj )}(hXD``cpuinfo_transition_latency`` The time it takes to switch the CPUs belonging to this policy from one P-state to another, in nanoseconds. If unknown or if known to be so high that the scaling driver does not work with the `ondemand`_ governor, -1 (:c:macro:`CPUFREQ_ETERNAL`) will be returned by reads from this attribute. h](j )}(h``cpuinfo_transition_latency``h]jt)}(hjQ h]hcpuinfo_transition_latency}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjO ubah}(h]h ]h"]h$]h&]uh1j hhhMhjK ubj )}(hhh](j)}(hjThe time it takes to switch the CPUs belonging to this policy from one P-state to another, in nanoseconds.h]hjThe time it takes to switch the CPUs belonging to this policy from one P-state to another, in nanoseconds.}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjf ubj)}(hIf unknown or if known to be so high that the scaling driver does not work with the `ondemand`_ governor, -1 (:c:macro:`CPUFREQ_ETERNAL`) will be returned by reads from this attribute.h](hTIf unknown or if known to be so high that the scaling driver does not work with the }(hjw hhhNhNubj)}(h `ondemand`_h]hondemand}(hj hhhNhNubah}(h]h ]h"]h$]h&]nameondemandrefidondemanduh1jhjw resolvedKubh governor, -1 (}(hjw hhhNhNubh)}(h:c:macro:`CPUFREQ_ETERNAL`h]jt)}(hj h]hCPUFREQ_ETERNAL}(hj hhhNhNubah}(h]h ](j[cc-macroeh"]h$]h&]uh1jshj ubah}(h]h ]h"]h$]h&]refdocjh refdomainj reftypemacro refexplicitrefwarnjnCPUFREQ_ETERNALuh1hhhhMhjw ubh0) will be returned by reads from this attribute.}(hjw hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjf ubeh}(h]h ]h"]h$]h&]uh1j hjK ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubj )}(hQ``related_cpus`` List of all (online and offline) CPUs belonging to this policy. h](j )}(h``related_cpus``h]jt)}(hj h]h related_cpus}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubah}(h]h ]h"]h$]h&]uh1j hhhMhj ubj )}(hhh]j)}(h?List of all (online and offline) CPUs belonging to this policy.h]h?List of all (online and offline) CPUs belonging to this policy.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubj )}(ho``scaling_available_frequencies`` List of available frequencies of the CPUs belonging to this policy (in kHz). h](j )}(h!``scaling_available_frequencies``h]jt)}(hj h]hscaling_available_frequencies}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j hhhMhjubj )}(hhh]j)}(hLList of available frequencies of the CPUs belonging to this policy (in kHz).h]hLList of available frequencies of the CPUs belonging to this policy (in kHz).}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubj )}(hX``scaling_available_governors`` List of ``CPUFreq`` scaling governors present in the kernel that can be attached to this policy or (if the |intel_pstate| scaling driver is in use) list of scaling algorithms provided by the driver that can be applied to this policy. [Note that some governors are modular and it may be necessary to load a kernel module for the governor held by it to become available and be listed by this attribute.] h](j )}(h``scaling_available_governors``h]jt)}(hjBh]hscaling_available_governors}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jshj@ubah}(h]h ]h"]h$]h&]uh1j hhhM(hj<ubj )}(hhh](j)}(hList of ``CPUFreq`` scaling governors present in the kernel that can be attached to this policy or (if the |intel_pstate| scaling driver is in use) list of scaling algorithms provided by the driver that can be applied to this policy.h](hList of }(hjZhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjZubhX scaling governors present in the kernel that can be attached to this policy or (if the }(hjZhhhNhNubh)}(hjMh]jP)}(hjMh]h intel_pstate}(hjwhhhNhNubah}(h]h ](j[j\j]eh"]h$]h&]uh1jOhNhNhjtubah}(h]h ]h"]h$]h&]refdocjh refdomainj\reftypejk refexplicitrefwarn reftargetjouh1hhhhKhjZhhubhp scaling driver is in use) list of scaling algorithms provided by the driver that can be applied to this policy.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM!hjWubj)}(h[Note that some governors are modular and it may be necessary to load a kernel module for the governor held by it to become available and be listed by this attribute.]h]h[Note that some governors are modular and it may be necessary to load a kernel module for the governor held by it to become available and be listed by this attribute.]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM&hjWubeh}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hhhM(hj hhubj )}(hX``scaling_cur_freq`` Current frequency of all of the CPUs belonging to this policy (in kHz). In the majority of cases, this is the frequency of the last P-state requested by the scaling driver from the hardware using the scaling interface provided by it, which may or may not reflect the frequency the CPU is actually running at (due to hardware design and other limitations). Some architectures (e.g. ``x86``) may attempt to provide information more precisely reflecting the current CPU frequency through this attribute, but that still may not be the exact current CPU frequency as seen by the hardware at the moment. This behavior though, is only available via c:macro:``CPUFREQ_ARCH_CUR_FREQ`` option. h](j )}(h``scaling_cur_freq``h]jt)}(hjh]hscaling_cur_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j hhhM7hjubj )}(hhh](j)}(hGCurrent frequency of all of the CPUs belonging to this policy (in kHz).h]hGCurrent frequency of all of the CPUs belonging to this policy (in kHz).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM+hjubj)}(hXIn the majority of cases, this is the frequency of the last P-state requested by the scaling driver from the hardware using the scaling interface provided by it, which may or may not reflect the frequency the CPU is actually running at (due to hardware design and other limitations).h]hXIn the majority of cases, this is the frequency of the last P-state requested by the scaling driver from the hardware using the scaling interface provided by it, which may or may not reflect the frequency the CPU is actually running at (due to hardware design and other limitations).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM-hjubj)}(hXGSome architectures (e.g. ``x86``) may attempt to provide information more precisely reflecting the current CPU frequency through this attribute, but that still may not be the exact current CPU frequency as seen by the hardware at the moment. This behavior though, is only available via c:macro:``CPUFREQ_ARCH_CUR_FREQ`` option.h](hSome architectures (e.g. }(hjhhhNhNubjt)}(h``x86``h]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhX) may attempt to provide information more precisely reflecting the current CPU frequency through this attribute, but that still may not be the exact current CPU frequency as seen by the hardware at the moment. This behavior though, is only available via c:macro:}(hjhhhNhNubjt)}(h``CPUFREQ_ARCH_CUR_FREQ``h]hCPUFREQ_ARCH_CUR_FREQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh option.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM3hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhM7hj hhubj )}(h8``scaling_driver`` The scaling driver currently in use. h](j )}(h``scaling_driver``h]jt)}(hj2h]hscaling_driver}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj0ubah}(h]h ]h"]h$]h&]uh1j hhhM:hj,ubj )}(hhh]j)}(h$The scaling driver currently in use.h]h$The scaling driver currently in use.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM:hjGubah}(h]h ]h"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]uh1j hhhM:hj hhubj )}(hXR``scaling_governor`` The scaling governor currently attached to this policy or (if the |intel_pstate| scaling driver is in use) the scaling algorithm provided by the driver that is currently applied to this policy. This attribute is read-write and writing to it will cause a new scaling governor to be attached to this policy or a new scaling algorithm provided by the scaling driver to be applied to it (in the |intel_pstate| case), as indicated by the string written to this attribute (which must be one of the names listed by the ``scaling_available_governors`` attribute described above). h](j )}(h``scaling_governor``h]jt)}(hjjh]hscaling_governor}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjhubah}(h]h ]h"]h$]h&]uh1j hhhMFhjdubj )}(hhh](j)}(hThe scaling governor currently attached to this policy or (if the |intel_pstate| scaling driver is in use) the scaling algorithm provided by the driver that is currently applied to this policy.h](hBThe scaling governor currently attached to this policy or (if the }(hjhhhNhNubh)}(hjMh]jP)}(hjMh]h intel_pstate}(hjhhhNhNubah}(h]h ](j[j\j]eh"]h$]h&]uh1jOhNhNhjubah}(h]h ]h"]h$]h&]refdocjh refdomainj\reftypejk refexplicitrefwarn reftargetjouh1hhhhKhjhhubhq scaling driver is in use) the scaling algorithm provided by the driver that is currently applied to this policy.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM=hjubj)}(hXyThis attribute is read-write and writing to it will cause a new scaling governor to be attached to this policy or a new scaling algorithm provided by the scaling driver to be applied to it (in the |intel_pstate| case), as indicated by the string written to this attribute (which must be one of the names listed by the ``scaling_available_governors`` attribute described above).h](hThis attribute is read-write and writing to it will cause a new scaling governor to be attached to this policy or a new scaling algorithm provided by the scaling driver to be applied to it (in the }(hjhhhNhNubh)}(hjMh]jP)}(hjMh]h intel_pstate}(hjhhhNhNubah}(h]h ](j[j\j]eh"]h$]h&]uh1jOhNhNhjubah}(h]h ]h"]h$]h&]refdocjh refdomainj\reftypejk refexplicitrefwarn reftargetjouh1hhhhKhjhhubhk case), as indicated by the string written to this attribute (which must be one of the names listed by the }(hjhhhNhNubjt)}(h``scaling_available_governors``h]hscaling_available_governors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh attribute described above).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMAhjubeh}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]uh1j hhhMFhj hhubj )}(hX/``scaling_max_freq`` Maximum frequency the CPUs belonging to this policy are allowed to be running at (in kHz). This attribute is read-write and writing a string representing an integer to it will cause a new limit to be set (it must not be lower than the value of the ``scaling_min_freq`` attribute). h](j )}(h``scaling_max_freq``h]jt)}(hjh]hscaling_max_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j hhhMNhjubj )}(hhh](j)}(hZMaximum frequency the CPUs belonging to this policy are allowed to be running at (in kHz).h]hZMaximum frequency the CPUs belonging to this policy are allowed to be running at (in kHz).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMIhjubj)}(hThis attribute is read-write and writing a string representing an integer to it will cause a new limit to be set (it must not be lower than the value of the ``scaling_min_freq`` attribute).h](hThis attribute is read-write and writing a string representing an integer to it will cause a new limit to be set (it must not be lower than the value of the }(hj(hhhNhNubjt)}(h``scaling_min_freq``h]hscaling_min_freq}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj(ubh attribute).}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMLhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhMNhj hhubj )}(hX<``scaling_min_freq`` Minimum frequency the CPUs belonging to this policy are allowed to be running at (in kHz). This attribute is read-write and writing a string representing a non-negative integer to it will cause a new limit to be set (it must not be higher than the value of the ``scaling_max_freq`` attribute). h](j )}(h``scaling_min_freq``h]jt)}(hjZh]hscaling_min_freq}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjXubah}(h]h ]h"]h$]h&]uh1j hhhMVhjTubj )}(hhh](j)}(hZMinimum frequency the CPUs belonging to this policy are allowed to be running at (in kHz).h]hZMinimum frequency the CPUs belonging to this policy are allowed to be running at (in kHz).}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMQhjoubj)}(hThis attribute is read-write and writing a string representing a non-negative integer to it will cause a new limit to be set (it must not be higher than the value of the ``scaling_max_freq`` attribute).h](hThis attribute is read-write and writing a string representing a non-negative integer to it will cause a new limit to be set (it must not be higher than the value of the }(hjhhhNhNubjt)}(h``scaling_max_freq``h]hscaling_max_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh attribute).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMThjoubeh}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1j hhhMVhj hhubj )}(hX``scaling_setspeed`` This attribute is functional only if the `userspace`_ scaling governor is attached to the given policy. It returns the last frequency requested by the governor (in kHz) or can be written to in order to set a new frequency for the policy. h](j )}(h``scaling_setspeed``h]jt)}(hjh]hscaling_setspeed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j hhhM^hjubj )}(hhh](j)}(hgThis attribute is functional only if the `userspace`_ scaling governor is attached to the given policy.h](h)This attribute is functional only if the }(hjhhhNhNubj)}(h `userspace`_h]h userspace}(hjhhhNhNubah}(h]h ]h"]h$]h&]name userspacej userspaceuh1jhjj Kubh2 scaling governor is attached to the given policy.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMYhjubj)}(hIt returns the last frequency requested by the governor (in kHz) or can be written to in order to set a new frequency for the policy.h]hIt returns the last frequency requested by the governor (in kHz) or can be written to in order to set a new frequency for the policy.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM\hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhM^hj hhubeh}(h]h ]h"]h$]h&]uh1j hj hhhhhNubeh}(h]policy-interface-in-sysfsah ]h"]policy interface in sysfsah$]h&]uh1jwhjyhhhhhKubjx)}(hhh](j})}(hGeneric Scaling Governorsh]hGeneric Scaling Governors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMaubj)}(h``CPUFreq`` provides generic scaling governors that can be used with all scaling drivers. As stated before, each of them implements a single, possibly parametrized, performance scaling algorithm.h](jt)}(h ``CPUFreq``h]hCPUFreq}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj&ubh provides generic scaling governors that can be used with all scaling drivers. As stated before, each of them implements a single, possibly parametrized, performance scaling algorithm.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMchjhhubj)}(hScaling governors are attached to policy objects and different policy objects can be handled by different scaling governors at the same time (although that may lead to suboptimal results in some cases).h]hScaling governors are attached to policy objects and different policy objects can be handled by different scaling governors at the same time (although that may lead to suboptimal results in some cases).}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMghjhhubj)}(hThe scaling governor for a given policy object can be changed at any time with the help of the ``scaling_governor`` policy attribute in ``sysfs``.h](h_The scaling governor for a given policy object can be changed at any time with the help of the }(hjPhhhNhNubjt)}(h``scaling_governor``h]hscaling_governor}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjPubh policy attribute in }(hjPhhhNhNubjt)}(h ``sysfs``h]hsysfs}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjPubh.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMkhjhhubj)}(hXNSome governors expose ``sysfs`` attributes to control or fine-tune the scaling algorithms implemented by them. Those attributes, referred to as governor tunables, can be either global (system-wide) or per-policy, depending on the scaling driver in use. If the driver requires governor tunables to be per-policy, they are located in a subdirectory of each policy directory. Otherwise, they are located in a subdirectory under :file:`/sys/devices/system/cpu/cpufreq/`. In either case the name of the subdirectory containing the governor tunables is the name of the governor providing them.h](hSome governors expose }(hjhhhNhNubjt)}(h ``sysfs``h]hsysfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhX attributes to control or fine-tune the scaling algorithms implemented by them. Those attributes, referred to as governor tunables, can be either global (system-wide) or per-policy, depending on the scaling driver in use. If the driver requires governor tunables to be per-policy, they are located in a subdirectory of each policy directory. Otherwise, they are located in a subdirectory under }(hjhhhNhNubjt)}(h(:file:`/sys/devices/system/cpu/cpufreq/`h]h /sys/devices/system/cpu/cpufreq/}(hjhhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jshjubh{. In either case the name of the subdirectory containing the governor tunables is the name of the governor providing them.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMnhjhhubjx)}(hhh](j})}(h``performance``h]jt)}(hjh]h performance}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMyubj)}(hWhen attached to a policy object, this governor causes the highest frequency, within the ``scaling_max_freq`` policy limit, to be requested for that policy.h](hYWhen attached to a policy object, this governor causes the highest frequency, within the }(hjhhhNhNubjt)}(h``scaling_max_freq``h]hscaling_max_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh/ policy limit, to be requested for that policy.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM{hjhhubj)}(hThe request is made once at that time the governor for the policy is set to ``performance`` and whenever the ``scaling_max_freq`` or ``scaling_min_freq`` policy limits change after that.h](hLThe request is made once at that time the governor for the policy is set to }(hjhhhNhNubjt)}(h``performance``h]h performance}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh and whenever the }(hjhhhNhNubjt)}(h``scaling_max_freq``h]hscaling_max_freq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh or }(hjhhhNhNubjt)}(h``scaling_min_freq``h]hscaling_min_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh! policy limits change after that.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM~hjhhubeh}(h] performanceah ]h"] performanceah$]h&]uh1jwhjhhhhhMyubjx)}(hhh](j})}(h ``powersave``h]jt)}(hjBh]h powersave}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jshj@ubah}(h]h ]h"]h$]h&]uh1j|hj=hhhhhMubj)}(hWhen attached to a policy object, this governor causes the lowest frequency, within the ``scaling_min_freq`` policy limit, to be requested for that policy.h](hXWhen attached to a policy object, this governor causes the lowest frequency, within the }(hjWhhhNhNubjt)}(h``scaling_min_freq``h]hscaling_min_freq}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjWubh/ policy limit, to be requested for that policy.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhj=hhubj)}(hThe request is made once at that time the governor for the policy is set to ``powersave`` and whenever the ``scaling_max_freq`` or ``scaling_min_freq`` policy limits change after that.h](hLThe request is made once at that time the governor for the policy is set to }(hjwhhhNhNubjt)}(h ``powersave``h]h powersave}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjwubh and whenever the }(hjwhhhNhNubjt)}(h``scaling_max_freq``h]hscaling_max_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjwubh or }(hjwhhhNhNubjt)}(h``scaling_min_freq``h]hscaling_min_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjwubh! policy limits change after that.}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhj=hhubeh}(h] powersaveah ]h"] powersaveah$]h&]uh1jwhjhhhhhMubjx)}(hhh](j})}(h ``userspace``h]jt)}(hjh]h userspace}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMubj)}(hThis governor does not do anything by itself. Instead, it allows user space to set the CPU frequency for the policy it is attached to by writing to the ``scaling_setspeed`` attribute of that policy.h](hThis governor does not do anything by itself. Instead, it allows user space to set the CPU frequency for the policy it is attached to by writing to the }(hjhhhNhNubjt)}(h``scaling_setspeed``h]hscaling_setspeed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh attribute of that policy.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h]jah ]h"] userspaceah$]h&]uh1jwhjhhhhhM referencedKubjx)}(hhh](j})}(h ``schedutil``h]jt)}(hj h]h schedutil}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMubj)}(hThis governor uses CPU utilization data available from the CPU scheduler. It generally is regarded as a part of the CPU scheduler, so it can access the scheduler's internal data structures directly.h]hThis governor uses CPU utilization data available from the CPU scheduler. It generally is regarded as a part of the CPU scheduler, so it can access the scheduler’s internal data structures directly.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hX.It runs entirely in scheduler context, although in some cases it may need to invoke the scaling driver asynchronously when it decides that the CPU frequency should be changed for a given policy (that depends on whether or not the driver is capable of changing the CPU frequency from scheduler context).h]hX.It runs entirely in scheduler context, although in some cases it may need to invoke the scaling driver asynchronously when it decides that the CPU frequency should be changed for a given policy (that depends on whether or not the driver is capable of changing the CPU frequency from scheduler context).}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hXThe actions of this governor for a particular CPU depend on the scheduling class invoking its utilization update callback for that CPU. If it is invoked by the RT or deadline scheduling classes, the governor will increase the frequency to the allowed maximum (that is, the ``scaling_max_freq`` policy limit). In turn, if it is invoked by the CFS scheduling class, the governor will use the Per-Entity Load Tracking (PELT) metric for the root control group of the given CPU as the CPU utilization estimate (see the *Per-entity load tracking* LWN.net article [1]_ for a description of the PELT mechanism). Then, the new CPU frequency to apply is computed in accordance with the formulah](hXThe actions of this governor for a particular CPU depend on the scheduling class invoking its utilization update callback for that CPU. If it is invoked by the RT or deadline scheduling classes, the governor will increase the frequency to the allowed maximum (that is, the }(hj;hhhNhNubjt)}(h``scaling_max_freq``h]hscaling_max_freq}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jshj;ubh policy limit). In turn, if it is invoked by the CFS scheduling class, the governor will use the Per-Entity Load Tracking (PELT) metric for the root control group of the given CPU as the CPU utilization estimate (see the }(hj;hhhNhNubhemphasis)}(h*Per-entity load tracking*h]hPer-entity load tracking}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jUhj;ubh LWN.net article }(hj;hhhNhNubhfootnote_reference)}(h[1]_h]h1}(hjkhhhNhNubah}(h]id1ah ]h"]h$]h&]j id2docnamejhuh1jihj;j Kubh{ for a description of the PELT mechanism). Then, the new CPU frequency to apply is computed in accordance with the formula}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubh block_quote)}(h(f = 1.25 * ``f_0`` * ``util`` / ``max`` h]j)}(h'f = 1.25 * ``f_0`` * ``util`` / ``max``h](h f = 1.25 * }(hjhhhNhNubjt)}(h``f_0``h]hf_0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh * }(hjhhhNhNubjt)}(h``util``h]hutil}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh / }(hjhhhNhNubjt)}(h``max``h]hmax}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hwhere ``util`` is the PELT number, ``max`` is the theoretical maximum of ``util``, and ``f_0`` is either the maximum possible CPU frequency for the given policy (if the PELT number is frequency-invariant), or the current CPU frequency (otherwise).h](hwhere }(hjhhhNhNubjt)}(h``util``h]hutil}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh is the PELT number, }(hjhhhNhNubjt)}(h``max``h]hmax}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh is the theoretical maximum of }(hjhhhNhNubjt)}(h``util``h]hutil}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh, and }(hjhhhNhNubjt)}(h``f_0``h]hf_0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh is either the maximum possible CPU frequency for the given policy (if the PELT number is frequency-invariant), or the current CPU frequency (otherwise).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hXThis governor also employs a mechanism allowing it to temporarily bump up the CPU frequency for tasks that have been waiting on I/O most recently, called "IO-wait boosting". That happens when the :c:macro:`SCHED_CPUFREQ_IOWAIT` flag is passed by the scheduler to the governor callback which causes the frequency to go up to the allowed maximum immediately and then draw back to the value returned by the above formula over time.h](hThis governor also employs a mechanism allowing it to temporarily bump up the CPU frequency for tasks that have been waiting on I/O most recently, called “IO-wait boosting”. That happens when the }(hj(hhhNhNubh)}(h:c:macro:`SCHED_CPUFREQ_IOWAIT`h]jt)}(hj2h]hSCHED_CPUFREQ_IOWAIT}(hj4hhhNhNubah}(h]h ](j[j c-macroeh"]h$]h&]uh1jshj0ubah}(h]h ]h"]h$]h&]refdocjh refdomainj reftypemacro refexplicitrefwarnjnSCHED_CPUFREQ_IOWAITuh1hhhhMhj(ubh flag is passed by the scheduler to the governor callback which causes the frequency to go up to the allowed maximum immediately and then draw back to the value returned by the above formula over time.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(h'This governor exposes only one tunable:h]h'This governor exposes only one tunable:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj )}(hhh]j )}(hXG``rate_limit_us`` Minimum time (in microseconds) that has to pass between two consecutive runs of governor computations (default: 1.5 times the scaling driver's transition latency or the maximum 2ms). The purpose of this tunable is to reduce the scheduler context overhead of the governor which might be excessive without it. h](j )}(h``rate_limit_us``h]jt)}(hjph]h rate_limit_us}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjnubah}(h]h ]h"]h$]h&]uh1j hhhMhjjubj )}(hhh](j)}(hMinimum time (in microseconds) that has to pass between two consecutive runs of governor computations (default: 1.5 times the scaling driver's transition latency or the maximum 2ms).h]hMinimum time (in microseconds) that has to pass between two consecutive runs of governor computations (default: 1.5 times the scaling driver’s transition latency or the maximum 2ms).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(h|The purpose of this tunable is to reduce the scheduler context overhead of the governor which might be excessive without it.h]h|The purpose of this tunable is to reduce the scheduler context overhead of the governor which might be excessive without it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]uh1j hhhMhjgubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj)}(hXThis governor generally is regarded as a replacement for the older `ondemand`_ and `conservative`_ governors (described below), as it is simpler and more tightly integrated with the CPU scheduler, its overhead in terms of CPU context switches and similar is less significant, and it uses the scheduler's own CPU utilization metric, so in principle its decisions should not contradict the decisions made by the other parts of the scheduler.h](hCThis governor generally is regarded as a replacement for the older }(hjhhhNhNubj)}(h `ondemand`_h]hondemand}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameondemandj j uh1jhjj Kubh and }(hjhhhNhNubj)}(h`conservative`_h]h conservative}(hjhhhNhNubah}(h]h ]h"]h$]h&]name conservativej conservativeuh1jhjj KubhXW governors (described below), as it is simpler and more tightly integrated with the CPU scheduler, its overhead in terms of CPU context switches and similar is less significant, and it uses the scheduler’s own CPU utilization metric, so in principle its decisions should not contradict the decisions made by the other parts of the scheduler.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h] schedutilah ]h"] schedutilah$]h&]uh1jwhjhhhhhMubjx)}(hhh](j})}(h ``ondemand``h]jt)}(hjh]hondemand}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMubj)}(h@This governor uses CPU load as a CPU frequency selection metric.h]h@This governor uses CPU load as a CPU frequency selection metric.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hX-In order to estimate the current CPU load, it measures the time elapsed between consecutive invocations of its worker routine and computes the fraction of that time in which the given CPU was not idle. The ratio of the non-idle (active) time to the total CPU time is taken as an estimate of the load.h]hX-In order to estimate the current CPU load, it measures the time elapsed between consecutive invocations of its worker routine and computes the fraction of that time in which the given CPU was not idle. The ratio of the non-idle (active) time to the total CPU time is taken as an estimate of the load.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hIf this governor is attached to a policy shared by multiple CPUs, the load is estimated for all of them and the greatest result is taken as the load estimate for the entire policy.h]hIf this governor is attached to a policy shared by multiple CPUs, the load is estimated for all of them and the greatest result is taken as the load estimate for the entire policy.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hX&The worker routine of this governor has to run in process context, so it is invoked asynchronously (via a workqueue) and CPU P-states are updated from there if necessary. As a result, the scheduler context overhead from this governor is minimum, but it causes additional CPU context switches to happen relatively often and the CPU P-state updates triggered by it can be relatively irregular. Also, it affects its own CPU load metric by running code that reduces the CPU idle time (even though the CPU idle time is only reduced very slightly by it).h]hX&The worker routine of this governor has to run in process context, so it is invoked asynchronously (via a workqueue) and CPU P-states are updated from there if necessary. As a result, the scheduler context overhead from this governor is minimum, but it causes additional CPU context switches to happen relatively often and the CPU P-state updates triggered by it can be relatively irregular. Also, it affects its own CPU load metric by running code that reduces the CPU idle time (even though the CPU idle time is only reduced very slightly by it).}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hXIt generally selects CPU frequencies proportional to the estimated load, so that the value of the ``cpuinfo_max_freq`` policy attribute corresponds to the load of 1 (or 100%), and the value of the ``cpuinfo_min_freq`` policy attribute corresponds to the load of 0, unless when the load exceeds a (configurable) speedup threshold, in which case it will go straight for the highest frequency it is allowed to use (the ``scaling_max_freq`` policy limit).h](hbIt generally selects CPU frequencies proportional to the estimated load, so that the value of the }(hjGhhhNhNubjt)}(h``cpuinfo_max_freq``h]hcpuinfo_max_freq}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjGubhO policy attribute corresponds to the load of 1 (or 100%), and the value of the }(hjGhhhNhNubjt)}(h``cpuinfo_min_freq``h]hcpuinfo_min_freq}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jshjGubh policy attribute corresponds to the load of 0, unless when the load exceeds a (configurable) speedup threshold, in which case it will go straight for the highest frequency it is allowed to use (the }(hjGhhhNhNubjt)}(h``scaling_max_freq``h]hscaling_max_freq}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jshjGubh policy limit).}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(h-This governor exposes the following tunables:h]h-This governor exposes the following tunables:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj )}(hhh](j )}(hXH``sampling_rate`` This is how often the governor's worker routine should run, in microseconds. Typically, it is set to values of the order of 2000 (2 ms). Its default value is to add a 50% breathing room to ``cpuinfo_transition_latency`` on each policy this governor is attached to. The minimum is typically the length of two scheduler ticks. If this tunable is per-policy, the following shell command sets the time represented by it to be 1.5 times as high as the transition latency (the default):: # echo `$(($(cat cpuinfo_transition_latency) * 3 / 2)) > ondemand/sampling_rate h](j )}(h``sampling_rate``h]jt)}(hjh]h sampling_rate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j hhhMhjubj )}(hhh](j)}(hLThis is how often the governor's worker routine should run, in microseconds.h]hNThis is how often the governor’s worker routine should run, in microseconds.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hTypically, it is set to values of the order of 2000 (2 ms). Its default value is to add a 50% breathing room to ``cpuinfo_transition_latency`` on each policy this governor is attached to. The minimum is typically the length of two scheduler ticks.h](hqTypically, it is set to values of the order of 2000 (2 ms). Its default value is to add a 50% breathing room to }(hjhhhNhNubjt)}(h``cpuinfo_transition_latency``h]hcpuinfo_transition_latency}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhi on each policy this governor is attached to. The minimum is typically the length of two scheduler ticks.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hIf this tunable is per-policy, the following shell command sets the time represented by it to be 1.5 times as high as the transition latency (the default)::h]hIf this tunable is per-policy, the following shell command sets the time represented by it to be 1.5 times as high as the transition latency (the default):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubh literal_block)}(hO# echo `$(($(cat cpuinfo_transition_latency) * 3 / 2)) > ondemand/sampling_rateh]hO# echo `$(($(cat cpuinfo_transition_latency) * 3 / 2)) > ondemand/sampling_rate}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhMhjubj )}(h``up_threshold`` If the estimated CPU load is above this value (in percent), the governor will set the frequency to the maximum value allowed for the policy. Otherwise, the selected frequency will be proportional to the estimated CPU load. h](j )}(h``up_threshold``h]jt)}(hjh]h up_threshold}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j hhhMhjubj )}(hhh]j)}(hIf the estimated CPU load is above this value (in percent), the governor will set the frequency to the maximum value allowed for the policy. Otherwise, the selected frequency will be proportional to the estimated CPU load.h]hIf the estimated CPU load is above this value (in percent), the governor will set the frequency to the maximum value allowed for the policy. Otherwise, the selected frequency will be proportional to the estimated CPU load.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj-ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhMhjhhubj )}(hX``ignore_nice_load`` If set to 1 (default 0), it will cause the CPU load estimation code to treat the CPU time spent on executing tasks with "nice" levels greater than 0 as CPU idle time. This may be useful if there are tasks in the system that should not be taken into account when deciding what frequency to run the CPUs at. Then, to make that happen it is sufficient to increase the "nice" level of those tasks above 0 and set this attribute to 1. h](j )}(h``ignore_nice_load``h]jt)}(hjPh]hignore_nice_load}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjNubah}(h]h ]h"]h$]h&]uh1j hhhMhjJubj )}(hhh](j)}(hIf set to 1 (default 0), it will cause the CPU load estimation code to treat the CPU time spent on executing tasks with "nice" levels greater than 0 as CPU idle time.h]hIf set to 1 (default 0), it will cause the CPU load estimation code to treat the CPU time spent on executing tasks with “nice” levels greater than 0 as CPU idle time.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjeubj)}(hXThis may be useful if there are tasks in the system that should not be taken into account when deciding what frequency to run the CPUs at. Then, to make that happen it is sufficient to increase the "nice" level of those tasks above 0 and set this attribute to 1.h]hX This may be useful if there are tasks in the system that should not be taken into account when deciding what frequency to run the CPUs at. Then, to make that happen it is sufficient to increase the “nice” level of those tasks above 0 and set this attribute to 1.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjeubeh}(h]h ]h"]h$]h&]uh1j hjJubeh}(h]h ]h"]h$]h&]uh1j hhhMhjhhubj )}(hX``sampling_down_factor`` Temporary multiplier, between 1 (default) and 100 inclusive, to apply to the ``sampling_rate`` value if the CPU load goes above ``up_threshold``. This causes the next execution of the governor's worker routine (after setting the frequency to the allowed maximum) to be delayed, so the frequency stays at the maximum level for a longer time. Frequency fluctuations in some bursty workloads may be avoided this way at the cost of additional energy spent on maintaining the maximum CPU capacity. h](j )}(h``sampling_down_factor``h]jt)}(hjh]hsampling_down_factor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j hhhMhjubj )}(hhh](j)}(hTemporary multiplier, between 1 (default) and 100 inclusive, to apply to the ``sampling_rate`` value if the CPU load goes above ``up_threshold``.h](hMTemporary multiplier, between 1 (default) and 100 inclusive, to apply to the }(hjhhhNhNubjt)}(h``sampling_rate``h]h sampling_rate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh" value if the CPU load goes above }(hjhhhNhNubjt)}(h``up_threshold``h]h up_threshold}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hThis causes the next execution of the governor's worker routine (after setting the frequency to the allowed maximum) to be delayed, so the frequency stays at the maximum level for a longer time.h]hThis causes the next execution of the governor’s worker routine (after setting the frequency to the allowed maximum) to be delayed, so the frequency stays at the maximum level for a longer time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hFrequency fluctuations in some bursty workloads may be avoided this way at the cost of additional energy spent on maintaining the maximum CPU capacity.h]hFrequency fluctuations in some bursty workloads may be avoided this way at the cost of additional energy spent on maintaining the maximum CPU capacity.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhMhjhhubj )}(hX``powersave_bias`` Reduction factor to apply to the original frequency target of the governor (including the maximum value used when the ``up_threshold`` value is exceeded by the estimated CPU load) or sensitivity threshold for the AMD frequency sensitivity powersave bias driver (:file:`drivers/cpufreq/amd_freq_sensitivity.c`), between 0 and 1000 inclusive. If the AMD frequency sensitivity powersave bias driver is not loaded, the effective frequency to apply is given by f * (1 - ``powersave_bias`` / 1000) where f is the governor's original frequency target. The default value of this attribute is 0 in that case. If the AMD frequency sensitivity powersave bias driver is loaded, the value of this attribute is 400 by default and it is used in a different way. On Family 16h (and later) AMD processors there is a mechanism to get a measured workload sensitivity, between 0 and 100% inclusive, from the hardware. That value can be used to estimate how the performance of the workload running on a CPU will change in response to frequency changes. The performance of a workload with the sensitivity of 0 (memory-bound or IO-bound) is not expected to increase at all as a result of increasing the CPU frequency, whereas workloads with the sensitivity of 100% (CPU-bound) are expected to perform much better if the CPU frequency is increased. If the workload sensitivity is less than the threshold represented by the ``powersave_bias`` value, the sensitivity powersave bias driver will cause the governor to select a frequency lower than its original target, so as to avoid over-provisioning workloads that will not benefit from running at higher CPU frequencies. h](j )}(h``powersave_bias``h]jt)}(hjh]hpowersave_bias}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshj ubah}(h]h ]h"]h$]h&]uh1j hhhM7hjubj )}(hhh](j)}(hXTReduction factor to apply to the original frequency target of the governor (including the maximum value used when the ``up_threshold`` value is exceeded by the estimated CPU load) or sensitivity threshold for the AMD frequency sensitivity powersave bias driver (:file:`drivers/cpufreq/amd_freq_sensitivity.c`), between 0 and 1000 inclusive.h](hvReduction factor to apply to the original frequency target of the governor (including the maximum value used when the }(hj&hhhNhNubjt)}(h``up_threshold``h]h up_threshold}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj&ubh value is exceeded by the estimated CPU load) or sensitivity threshold for the AMD frequency sensitivity powersave bias driver (}(hj&hhhNhNubjt)}(h.:file:`drivers/cpufreq/amd_freq_sensitivity.c`h]h&drivers/cpufreq/amd_freq_sensitivity.c}(hj@hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jshj&ubh ), between 0 and 1000 inclusive.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhj#ubj)}(hrIf the AMD frequency sensitivity powersave bias driver is not loaded, the effective frequency to apply is given byh]hrIf the AMD frequency sensitivity powersave bias driver is not loaded, the effective frequency to apply is given by}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj#ubj)}(h$f * (1 - ``powersave_bias`` / 1000) h]j)}(h#f * (1 - ``powersave_bias`` / 1000)h](h f * (1 - }(hjmhhhNhNubjt)}(h``powersave_bias``h]hpowersave_bias}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjmubh / 1000)}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjiubah}(h]h ]h"]h$]h&]uh1jhhhMhj#ubj)}(hlwhere f is the governor's original frequency target. The default value of this attribute is 0 in that case.h]hnwhere f is the governor’s original frequency target. The default value of this attribute is 0 in that case.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM!hj#ubj)}(hIf the AMD frequency sensitivity powersave bias driver is loaded, the value of this attribute is 400 by default and it is used in a different way.h]hIf the AMD frequency sensitivity powersave bias driver is loaded, the value of this attribute is 400 by default and it is used in a different way.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM$hj#ubj)}(hXOn Family 16h (and later) AMD processors there is a mechanism to get a measured workload sensitivity, between 0 and 100% inclusive, from the hardware. That value can be used to estimate how the performance of the workload running on a CPU will change in response to frequency changes.h]hXOn Family 16h (and later) AMD processors there is a mechanism to get a measured workload sensitivity, between 0 and 100% inclusive, from the hardware. That value can be used to estimate how the performance of the workload running on a CPU will change in response to frequency changes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM(hj#ubj)}(hX$The performance of a workload with the sensitivity of 0 (memory-bound or IO-bound) is not expected to increase at all as a result of increasing the CPU frequency, whereas workloads with the sensitivity of 100% (CPU-bound) are expected to perform much better if the CPU frequency is increased.h]hX$The performance of a workload with the sensitivity of 0 (memory-bound or IO-bound) is not expected to increase at all as a result of increasing the CPU frequency, whereas workloads with the sensitivity of 100% (CPU-bound) are expected to perform much better if the CPU frequency is increased.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM-hj#ubj)}(hX@If the workload sensitivity is less than the threshold represented by the ``powersave_bias`` value, the sensitivity powersave bias driver will cause the governor to select a frequency lower than its original target, so as to avoid over-provisioning workloads that will not benefit from running at higher CPU frequencies.h](hJIf the workload sensitivity is less than the threshold represented by the }(hjhhhNhNubjt)}(h``powersave_bias``h]hpowersave_bias}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh value, the sensitivity powersave bias driver will cause the governor to select a frequency lower than its original target, so as to avoid over-provisioning workloads that will not benefit from running at higher CPU frequencies.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM3hj#ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhM7hjhhubeh}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]j ah ]h"]ondemandah$]h&]uh1jwhjhhhhhMjKubjx)}(hhh](j})}(h``conservative``h]jt)}(hj h]h conservative}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhM:ubj)}(h@This governor uses CPU load as a CPU frequency selection metric.h]h@This governor uses CPU load as a CPU frequency selection metric.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM<hjhhubj)}(hIt estimates the CPU load in the same way as the `ondemand`_ governor described above, but the CPU frequency selection algorithm implemented by it is different.h](h1It estimates the CPU load in the same way as the }(hj,hhhNhNubj)}(h `ondemand`_h]hondemand}(hj4hhhNhNubah}(h]h ]h"]h$]h&]nameondemandj j uh1jhj,j Kubhd governor described above, but the CPU frequency selection algorithm implemented by it is different.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM>hjhhubj)}(hX|Namely, it avoids changing the frequency significantly over short time intervals which may not be suitable for systems with limited power supply capacity (e.g. battery-powered). To achieve that, it changes the frequency in relatively small steps, one step at a time, up or down - depending on whether or not a (configurable) threshold has been exceeded by the estimated CPU load.h]hX|Namely, it avoids changing the frequency significantly over short time intervals which may not be suitable for systems with limited power supply capacity (e.g. battery-powered). To achieve that, it changes the frequency in relatively small steps, one step at a time, up or down - depending on whether or not a (configurable) threshold has been exceeded by the estimated CPU load.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMAhjhhubj)}(h-This governor exposes the following tunables:h]h-This governor exposes the following tunables:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMGhjhhubj )}(hhh](j )}(hX``freq_step`` Frequency step in percent of the maximum frequency the governor is allowed to set (the ``scaling_max_freq`` policy limit), between 0 and 100 (5 by default). This is how much the frequency is allowed to change in one go. Setting it to 0 will cause the default frequency step (5 percent) to be used and setting it to 100 effectively causes the governor to periodically switch the frequency between the ``scaling_min_freq`` and ``scaling_max_freq`` policy limits. h](j )}(h ``freq_step``h]jt)}(hjsh]h freq_step}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjqubah}(h]h ]h"]h$]h&]uh1j hhhMRhjmubj )}(hhh](j)}(hFrequency step in percent of the maximum frequency the governor is allowed to set (the ``scaling_max_freq`` policy limit), between 0 and 100 (5 by default).h](hWFrequency step in percent of the maximum frequency the governor is allowed to set (the }(hjhhhNhNubjt)}(h``scaling_max_freq``h]hscaling_max_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh1 policy limit), between 0 and 100 (5 by default).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMJhjubj)}(hX0This is how much the frequency is allowed to change in one go. Setting it to 0 will cause the default frequency step (5 percent) to be used and setting it to 100 effectively causes the governor to periodically switch the frequency between the ``scaling_min_freq`` and ``scaling_max_freq`` policy limits.h](hThis is how much the frequency is allowed to change in one go. Setting it to 0 will cause the default frequency step (5 percent) to be used and setting it to 100 effectively causes the governor to periodically switch the frequency between the }(hjhhhNhNubjt)}(h``scaling_min_freq``h]hscaling_min_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh and }(hjhhhNhNubjt)}(h``scaling_max_freq``h]hscaling_max_freq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh policy limits.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMNhjubeh}(h]h ]h"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]uh1j hhhMRhjjubj )}(hX``down_threshold`` Threshold value (in percent, 20 by default) used to determine the frequency change direction. If the estimated CPU load is greater than this value, the frequency will go up (by ``freq_step``). If the load is less than this value (and the ``sampling_down_factor`` mechanism is not in effect), the frequency will go down. Otherwise, the frequency will not be changed. h](j )}(h``down_threshold``h]jt)}(hjh]hdown_threshold}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1j hhhM[hjubj )}(hhh](j)}(h]Threshold value (in percent, 20 by default) used to determine the frequency change direction.h]h]Threshold value (in percent, 20 by default) used to determine the frequency change direction.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMUhjubj)}(hXIf the estimated CPU load is greater than this value, the frequency will go up (by ``freq_step``). If the load is less than this value (and the ``sampling_down_factor`` mechanism is not in effect), the frequency will go down. Otherwise, the frequency will not be changed.h](hSIf the estimated CPU load is greater than this value, the frequency will go up (by }(hjhhhNhNubjt)}(h ``freq_step``h]h freq_step}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh1). If the load is less than this value (and the }(hjhhhNhNubjt)}(h``sampling_down_factor``h]hsampling_down_factor}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhh mechanism is not in effect), the frequency will go down. Otherwise, the frequency will not be changed.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMXhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhM[hjjhhubj )}(h``sampling_down_factor`` Frequency decrease deferral factor, between 1 (default) and 10 inclusive. It effectively causes the frequency to go down ``sampling_down_factor`` times slower than it ramps up. h](j )}(h``sampling_down_factor``h]jt)}(hjYh]hsampling_down_factor}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjWubah}(h]h ]h"]h$]h&]uh1j hhhMchjSubj )}(hhh](j)}(hIFrequency decrease deferral factor, between 1 (default) and 10 inclusive.h]hIFrequency decrease deferral factor, between 1 (default) and 10 inclusive.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM^hjnubj)}(hfIt effectively causes the frequency to go down ``sampling_down_factor`` times slower than it ramps up.h](h/It effectively causes the frequency to go down }(hjhhhNhNubjt)}(h``sampling_down_factor``h]hsampling_down_factor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh times slower than it ramps up.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMahjnubeh}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hhhMchjjhhubeh}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]jah ]h"] conservativeah$]h&]uh1jwhjhhhhhM:jKubeh}(h]generic-scaling-governorsah ]h"]generic scaling governorsah$]h&]uh1jwhjyhhhhhMaubjx)}(hhh](j})}(hFrequency Boost Supporth]hFrequency Boost Support}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMfubjx)}(hhh](j})}(h Backgroundh]h Background}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMiubj)}(hX9Some processors support a mechanism to raise the operating frequency of some cores in a multicore package temporarily (and above the sustainable frequency threshold for the whole package) under certain conditions, for example if the whole chip is not fully utilized and below its intended thermal or power budget.h]hX9Some processors support a mechanism to raise the operating frequency of some cores in a multicore package temporarily (and above the sustainable frequency threshold for the whole package) under certain conditions, for example if the whole chip is not fully utilized and below its intended thermal or power budget.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMkhjhhubj)}(hXDifferent names are used by different vendors to refer to this functionality. For Intel processors it is referred to as "Turbo Boost", AMD calls it "Turbo-Core" or (in technical documentation) "Core Performance Boost" and so on. As a rule, it also is implemented differently by different vendors. The simple term "frequency boost" is used here for brevity to refer to all of those implementations.h]hXDifferent names are used by different vendors to refer to this functionality. For Intel processors it is referred to as “Turbo Boost”, AMD calls it “Turbo-Core” or (in technical documentation) “Core Performance Boost” and so on. As a rule, it also is implemented differently by different vendors. The simple term “frequency boost” is used here for brevity to refer to all of those implementations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMphjhhubj)}(hXThe frequency boost mechanism may be either hardware-based or software-based. If it is hardware-based (e.g. on x86), the decision to trigger the boosting is made by the hardware (although in general it requires the hardware to be put into a special state in which it can control the CPU frequency within certain limits). If it is software-based (e.g. on ARM), the scaling driver decides whether or not to trigger boosting and when to do that.h]hXThe frequency boost mechanism may be either hardware-based or software-based. If it is hardware-based (e.g. on x86), the decision to trigger the boosting is made by the hardware (although in general it requires the hardware to be put into a special state in which it can control the CPU frequency within certain limits). If it is software-based (e.g. on ARM), the scaling driver decides whether or not to trigger boosting and when to do that.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMwhjhhubeh}(h] backgroundah ]h"] backgroundah$]h&]uh1jwhjhhhhhMiubjx)}(hhh](j})}(hThe ``boost`` File in ``sysfs``h](hThe }(hjhhhNhNubjt)}(h ``boost``h]hboost}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh File in }(hjhhhNhNubjt)}(h ``sysfs``h]hsysfs}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubeh}(h]h ]h"]h$]h&]uh1j|hjhhhhhMubj)}(hXAThis file is located under :file:`/sys/devices/system/cpu/cpufreq/` and controls the "boost" setting for the whole system. It is not present if the underlying scaling driver does not support the frequency boost mechanism (or supports it, but provides a driver-specific interface for controlling it, like |intel_pstate|).h](hThis file is located under }(hjEhhhNhNubjt)}(h(:file:`/sys/devices/system/cpu/cpufreq/`h]h /sys/devices/system/cpu/cpufreq/}(hjMhhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jshjEubh and controls the “boost” setting for the whole system. It is not present if the underlying scaling driver does not support the frequency boost mechanism (or supports it, but provides a driver-specific interface for controlling it, like }(hjEhhhNhNubh)}(hjMh]jP)}(hjMh]h intel_pstate}(hjehhhNhNubah}(h]h ](j[j\j]eh"]h$]h&]uh1jOhNhNhjbubah}(h]h ]h"]h$]h&]refdocjh refdomainj\reftypejk refexplicitrefwarn reftargetjouh1hhhhKhjEhhubh).}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hXIf the value in this file is 1, the frequency boost mechanism is enabled. This means that either the hardware can be put into states in which it is able to trigger boosting (in the hardware-based case), or the software is allowed to trigger boosting (in the software-based case). It does not mean that boosting is actually in use at the moment on any CPUs in the system. It only means a permission to use the frequency boost mechanism (which still may never be used for other reasons).h]hXIf the value in this file is 1, the frequency boost mechanism is enabled. This means that either the hardware can be put into states in which it is able to trigger boosting (in the hardware-based case), or the software is allowed to trigger boosting (in the software-based case). It does not mean that boosting is actually in use at the moment on any CPUs in the system. It only means a permission to use the frequency boost mechanism (which still may never be used for other reasons).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hdIf the value in this file is 0, the frequency boost mechanism is disabled and cannot be used at all.h]hdIf the value in this file is 0, the frequency boost mechanism is disabled and cannot be used at all.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(h=The only values that can be written to this file are 0 and 1.h]h=The only values that can be written to this file are 0 and 1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h]the-boost-file-in-sysfsah ]h"]the boost file in sysfsah$]h&]uh1jwhjhhhhhMubjx)}(hhh](j})}(h Rationale for Boost Control Knobh]h Rationale for Boost Control Knob}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMubj)}(hXThe frequency boost mechanism is generally intended to help to achieve optimum CPU performance on time scales below software resolution (e.g. below the scheduler tick interval) and it is demonstrably suitable for many workloads, but it may lead to problems in certain situations.h]hXThe frequency boost mechanism is generally intended to help to achieve optimum CPU performance on time scales below software resolution (e.g. below the scheduler tick interval) and it is demonstrably suitable for many workloads, but it may lead to problems in certain situations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hXFor this reason, many systems make it possible to disable the frequency boost mechanism in the platform firmware (BIOS) setup, but that requires the system to be restarted for the setting to be adjusted as desired, which may not be practical at least in some cases. For example:h]hXFor this reason, many systems make it possible to disable the frequency boost mechanism in the platform firmware (BIOS) setup, but that requires the system to be restarted for the setting to be adjusted as desired, which may not be practical at least in some cases. For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hX1. Boosting means overclocking the processor, although under controlled conditions. Generally, the processor's energy consumption increases as a result of increasing its frequency and voltage, even temporarily. That may not be desirable on systems that switch to power sources of limited capacity, such as batteries, so the ability to disable the boost mechanism while the system is running may help there (but that depends on the workload too). 2. In some situations deterministic behavior is more important than performance or energy consumption (or both) and the ability to disable boosting while the system is running may be useful then. 3. To examine the impact of the frequency boost mechanism itself, it is useful to be able to run tests with and without boosting, preferably without restarting the system in the meantime. 4. Reproducible results are important when running benchmarks. Since the boosting functionality depends on the load of the whole package, single-thread performance may vary because of it which may lead to unreproducible results sometimes. That can be avoided by disabling the frequency boost mechanism before running benchmarks sensitive to that issue. h]henumerated_list)}(hhh](h list_item)}(hXBoosting means overclocking the processor, although under controlled conditions. Generally, the processor's energy consumption increases as a result of increasing its frequency and voltage, even temporarily. That may not be desirable on systems that switch to power sources of limited capacity, such as batteries, so the ability to disable the boost mechanism while the system is running may help there (but that depends on the workload too). h]j)}(hXBoosting means overclocking the processor, although under controlled conditions. Generally, the processor's energy consumption increases as a result of increasing its frequency and voltage, even temporarily. That may not be desirable on systems that switch to power sources of limited capacity, such as batteries, so the ability to disable the boost mechanism while the system is running may help there (but that depends on the workload too).h]hXBoosting means overclocking the processor, although under controlled conditions. Generally, the processor’s energy consumption increases as a result of increasing its frequency and voltage, even temporarily. That may not be desirable on systems that switch to power sources of limited capacity, such as batteries, so the ability to disable the boost mechanism while the system is running may help there (but that depends on the workload too). 8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hIn some situations deterministic behavior is more important than performance or energy consumption (or both) and the ability to disable boosting while the system is running may be useful then. h]j)}(hIn some situations deterministic behavior is more important than performance or energy consumption (or both) and the ability to disable boosting while the system is running may be useful then.h]hIn some situations deterministic behavior is more important than performance or energy consumption (or both) and the ability to disable boosting while the system is running may be useful then.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hTo examine the impact of the frequency boost mechanism itself, it is useful to be able to run tests with and without boosting, preferably without restarting the system in the meantime. h]j)}(hTo examine the impact of the frequency boost mechanism itself, it is useful to be able to run tests with and without boosting, preferably without restarting the system in the meantime.h]hTo examine the impact of the frequency boost mechanism itself, it is useful to be able to run tests with and without boosting, preferably without restarting the system in the meantime.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hX`Reproducible results are important when running benchmarks. Since the boosting functionality depends on the load of the whole package, single-thread performance may vary because of it which may lead to unreproducible results sometimes. That can be avoided by disabling the frequency boost mechanism before running benchmarks sensitive to that issue. h]j)}(hX_Reproducible results are important when running benchmarks. Since the boosting functionality depends on the load of the whole package, single-thread performance may vary because of it which may lead to unreproducible results sometimes. That can be avoided by disabling the frequency boost mechanism before running benchmarks sensitive to that issue.h]hX_Reproducible results are important when running benchmarks. Since the boosting functionality depends on the load of the whole package, single-thread performance may vary because of it which may lead to unreproducible results sometimes. That can be avoided by disabling the frequency boost mechanism before running benchmarks sensitive to that issue.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj:ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h] rationale-for-boost-control-knobah ]h"] rationale for boost control knobah$]h&]uh1jwhjhhhhhMubjx)}(hhh](j})}(hLegacy AMD ``cpb`` Knobh](h Legacy AMD }(hjnhhhNhNubjt)}(h``cpb``h]hcpb}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjnubh Knob}(hjnhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hjkhhhhhMubj)}(hThe AMD powernow-k8 scaling driver supports a ``sysfs`` knob very similar to the global ``boost`` one. It is used for disabling/enabling the "Core Performance Boost" feature of some AMD processors.h](h.The AMD powernow-k8 scaling driver supports a }(hjhhhNhNubjt)}(h ``sysfs``h]hsysfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh! knob very similar to the global }(hjhhhNhNubjt)}(h ``boost``h]hboost}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhi one. It is used for disabling/enabling the “Core Performance Boost” feature of some AMD processors.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjkhhubj)}(hXIf present, that knob is located in every ``CPUFreq`` policy directory in ``sysfs`` (:file:`/sys/devices/system/cpu/cpufreq/policyX/`) and is called ``cpb``, which indicates a more fine grained control interface. The actual implementation, however, works on the system-wide basis and setting that knob for one policy causes the same value of it to be set for all of the other policies at the same time.h](h*If present, that knob is located in every }(hjhhhNhNubjt)}(h ``CPUFreq``h]hCPUFreq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh policy directory in }(hjhhhNhNubjt)}(h ``sysfs``h]hsysfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh (}(hjhhhNhNubjt)}(h0:file:`/sys/devices/system/cpu/cpufreq/policyX/`h]h(/sys/devices/system/cpu/cpufreq/policyX/}(hjhhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jshjubh) and is called }(hjhhhNhNubjt)}(h``cpb``h]hcpb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh, which indicates a more fine grained control interface. The actual implementation, however, works on the system-wide basis and setting that knob for one policy causes the same value of it to be set for all of the other policies at the same time.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjkhhubj)}(hXThat knob is still supported on AMD processors that support its underlying hardware feature, but it may be configured out of the kernel (via the :c:macro:`CONFIG_X86_ACPI_CPUFREQ_CPB` configuration option) and the global ``boost`` knob is present regardless. Thus it is always possible use the ``boost`` knob instead of the ``cpb`` one which is highly recommended, as that is more consistent with what all of the other systems do (and the ``cpb`` knob may not be supported any more in the future).h](hThat knob is still supported on AMD processors that support its underlying hardware feature, but it may be configured out of the kernel (via the }(hjhhhNhNubh)}(h&:c:macro:`CONFIG_X86_ACPI_CPUFREQ_CPB`h]jt)}(hj#h]hCONFIG_X86_ACPI_CPUFREQ_CPB}(hj%hhhNhNubah}(h]h ](j[j c-macroeh"]h$]h&]uh1jshj!ubah}(h]h ]h"]h$]h&]refdocjh refdomainj reftypemacro refexplicitrefwarnjnCONFIG_X86_ACPI_CPUFREQ_CPBuh1hhhhMhjubh& configuration option) and the global }(hjhhhNhNubjt)}(h ``boost``h]hboost}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhA knob is present regardless. Thus it is always possible use the }(hjhhhNhNubjt)}(h ``boost``h]hboost}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh knob instead of the }(hjhhhNhNubjt)}(h``cpb``h]hcpb}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhl one which is highly recommended, as that is more consistent with what all of the other systems do (and the }(hjhhhNhNubjt)}(h``cpb``h]hcpb}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh3 knob may not be supported any more in the future).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjkhhubj)}(hThe ``cpb`` knob is never present for any processors without the underlying hardware feature (e.g. all Intel ones), even if the :c:macro:`CONFIG_X86_ACPI_CPUFREQ_CPB` configuration option is set.h](hThe }(hjhhhNhNubjt)}(h``cpb``h]hcpb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubhu knob is never present for any processors without the underlying hardware feature (e.g. all Intel ones), even if the }(hjhhhNhNubh)}(h&:c:macro:`CONFIG_X86_ACPI_CPUFREQ_CPB`h]jt)}(hjh]hCONFIG_X86_ACPI_CPUFREQ_CPB}(hjhhhNhNubah}(h]h ](j[j c-macroeh"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]refdocjh refdomainj reftypemacro refexplicitrefwarnjnCONFIG_X86_ACPI_CPUFREQ_CPBuh1hhhhMhjubh configuration option is set.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjkhhubeh}(h]legacy-amd-cpb-knobah ]h"]legacy amd cpb knobah$]h&]uh1jwhjhhhhhMubeh}(h]frequency-boost-supportah ]h"]frequency boost supportah$]h&]uh1jwhjyhhhhhMfubjx)}(hhh](j})}(h Referencesh]h References}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjhhhhhMubhfootnote)}(hMJonathan Corbet, *Per-entity load tracking*, https://lwn.net/Articles/531853/h](hlabel)}(h1h]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hMJonathan Corbet, *Per-entity load tracking*, https://lwn.net/Articles/531853/h](hJonathan Corbet, }(hj hhhNhNubjV)}(h*Per-entity load tracking*h]hPer-entity load tracking}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jUhj ubh, }(hj hhhNhNubj)}(h https://lwn.net/Articles/531853/h]h https://lwn.net/Articles/531853/}(hj&hhhNhNubah}(h]h ]h"]h$]h&]refurij(uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]jzah ]h"]1ah$]h&]juaj{jhuh1jhhhMhjhhj Kubeh}(h] referencesah ]h"] referencesah$]h&]uh1jwhjyhhhhhMubeh}(h]cpu-performance-scalingah ]h"]cpu performance scalingah$]h&]uh1jwhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(j|N generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjuerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}(hhhhhhj jjjj*jj9j-jHj<jWjKjfjZjujijjxjjjjjjjjjjjjjjjjj jjjj)jj8j,jGj;jVjJjejYjtjhjjwjjjjjjjjjjjjjjjjj jjj j(jj7j+jFj:jUjIjdjXjsjgjjvjjjjjjjjjjjjjjjjj jjj j'jj6j*jEj9jTjHjcjWjrjfjjujjjjjjjjjjjjjjjjjjjj j&jj5j)jDj8jtjGusubstitution_names}(amphߌaposhasthbrvbarj bsoljcentj*colonj9commajHcommatjWcopyjfcurrenjudarrjdegjdividejdollarjequalsjexcljfrac12jfrac14jfrac18jfrac34j frac38jfrac58j)frac78j8gtjGhalfjVhorbarjehyphenjtiexcljiquestjlaquojlarrjlcubjldquojlowbarjlparjlsqbjlsquoj ltjmicroj(middotj7nbspjFnotjUnumjdohmjsordfjordmjparajpercntjperiodjplusjplusmnjpoundjquestjquotj raquojrarrj'rcubj6rdquojEregjTrparjcrsqbjrrsquojsectjsemijshyjsoljsungjsup1jsup2jsup3jtimesjtradejuarrj&verbarj5yenjD intel_pstatejturefnames}(ondemand](j jj4e userspace]ja1]jka conservative]jaurefids}nameids}(jOjLjWjTjjjjj j jjjjj:j7jjjjjjjj jjjjjjjjjhjejjjGjDj?jzu nametypes}(jOjWjjj jjj:jjjjjjjjjhjjGj?uh}(jLjyjTjjjZjjj jjj jjj7jjj=jjjjjujkj jjjjjjjjjjejjjkjDjjzju footnote_refs}j]jkas citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes]ja citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log](Documentation/admin-guide/pm/cpufreq.rst(NNNNta decorationNhhub.