€• Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ*/translations/zh_CN/admin-guide/pm/cpuidle”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/zh_TW/admin-guide/pm/cpuidle”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/admin-guide/pm/cpuidle”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/admin-guide/pm/cpuidle”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/admin-guide/pm/cpuidle”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/pt_BR/admin-guide/pm/cpuidle”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/sp_SP/admin-guide/pm/cpuidle”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒD/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle.rst”h´Kubh¶)�”}”(hŒ4This data file has been placed in the public domain.”h]”hŒ4This data file has been placed in the public domain.”…”�”}”hhÈsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhh²hh³Œo/srv/docbuild/lib/venvs/build-kernel-docs/lib64/python3.9/site-packages/docutils/parsers/rst/include/isonum.txt”h´Kubh¶)�”}”(hŒ¸Derived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .”h]”hŒ¸Derived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .”…”�”}”hh×sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhh²hh³hÖh´KubhŒsubstitution_definition”“”)�”}”(hŒ*.. |amp| unicode:: U+00026 .. AMPERSAND”h]”hŒ&”…”�”}”hhçsbah}”(h]”h ]”h"]”Œamp”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ+.. |apos| unicode:: U+00027 .. APOSTROPHE”h]”hŒ'”…”�”}”hhösbah}”(h]”h ]”h"]”Œapos”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ).. |ast| unicode:: U+0002A .. ASTERISK”h]”hŒ*”…”�”}”hjsbah}”(h]”h ]”h"]”Œast”ah$]”h&]”uh1håh³hÖh´K hhh²hubhæ)�”}”(hŒ+.. |brvbar| unicode:: U+000A6 .. BROKEN BAR”h]”hŒ¦”…”�”}”hjsbah}”(h]”h ]”h"]”Œbrvbar”ah$]”h&]”uh1håh³hÖh´K hhh²hubhæ)�”}”(hŒ0.. |bsol| unicode:: U+0005C .. REVERSE SOLIDUS”h]”hŒ\”…”�”}”hj#sbah}”(h]”h ]”h"]”Œbsol”ah$]”h&]”uh1håh³hÖh´K hhh²hubhæ)�”}”(hŒ*.. |cent| unicode:: U+000A2 .. CENT SIGN”h]”hŒ¢”…”�”}”hj2sbah}”(h]”h ]”h"]”Œcent”ah$]”h&]”uh1håh³hÖh´K hhh²hubhæ)�”}”(hŒ&.. |colon| unicode:: U+0003A .. COLON”h]”hŒ:”…”�”}”hjAsbah}”(h]”h ]”h"]”Œcolon”ah$]”h&]”uh1håh³hÖh´K hhh²hubhæ)�”}”(hŒ&.. |comma| unicode:: U+0002C .. COMMA”h]”hŒ,”…”�”}”hjPsbah}”(h]”h ]”h"]”Œcomma”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ... |commat| unicode:: U+00040 .. COMMERCIAL AT”h]”hŒ@”…”�”}”hj_sbah}”(h]”h ]”h"]”Œcommat”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ/.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN”h]”hŒ©”…”�”}”hjnsbah}”(h]”h ]”h"]”Œcopy”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ... |curren| unicode:: U+000A4 .. CURRENCY SIGN”h]”hŒ¤”…”�”}”hj}sbah}”(h]”h ]”h"]”Œcurren”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ0.. |darr| unicode:: U+02193 .. DOWNWARDS ARROW”h]”hŒ↓”…”�”}”hjŒsbah}”(h]”h ]”h"]”Œdarr”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ,.. |deg| unicode:: U+000B0 .. DEGREE SIGN”h]”hŒ°”…”�”}”hj›sbah}”(h]”h ]”h"]”Œdeg”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ... |divide| unicode:: U+000F7 .. DIVISION SIGN”h]”hŒ÷”…”�”}”hjªsbah}”(h]”h ]”h"]”Œdivide”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ,.. |dollar| unicode:: U+00024 .. DOLLAR SIGN”h]”hŒ$”…”�”}”hj¹sbah}”(h]”h ]”h"]”Œdollar”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ,.. |equals| unicode:: U+0003D .. EQUALS SIGN”h]”hŒ=”…”�”}”hjÈsbah}”(h]”h ]”h"]”Œequals”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ1.. |excl| unicode:: U+00021 .. EXCLAMATION MARK”h]”hŒ!”…”�”}”hj×sbah}”(h]”h ]”h"]”Œexcl”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ9.. |frac12| unicode:: U+000BD .. VULGAR FRACTION ONE HALF”h]”hŒ½”…”�”}”hjæsbah}”(h]”h ]”h"]”Œfrac12”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ<.. |frac14| unicode:: U+000BC .. VULGAR FRACTION ONE QUARTER”h]”hŒ¼”…”�”}”hjõsbah}”(h]”h ]”h"]”Œfrac14”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ;.. |frac18| unicode:: U+0215B .. VULGAR FRACTION ONE EIGHTH”h]”hŒâ…›”…”�”}”hjsbah}”(h]”h ]”h"]”Œfrac18”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ?.. |frac34| unicode:: U+000BE .. VULGAR FRACTION THREE QUARTERS”h]”hŒ¾”…”�”}”hjsbah}”(h]”h ]”h"]”Œfrac34”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ>.. |frac38| unicode:: U+0215C .. VULGAR FRACTION THREE EIGHTHS”h]”hŒâ…œ”…”�”}”hj"sbah}”(h]”h ]”h"]”Œfrac38”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ=.. |frac58| unicode:: U+0215D .. VULGAR FRACTION FIVE EIGHTHS”h]”hŒâ…�”…”�”}”hj1sbah}”(h]”h ]”h"]”Œfrac58”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ>.. |frac78| unicode:: U+0215E .. VULGAR FRACTION SEVEN EIGHTHS”h]”hŒâ…ž”…”�”}”hj@sbah}”(h]”h ]”h"]”Œfrac78”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ2.. |gt| unicode:: U+0003E .. GREATER-THAN SIGN”h]”hŒ>”…”�”}”hjOsbah}”(h]”h ]”h"]”Œgt”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ9.. |half| unicode:: U+000BD .. VULGAR FRACTION ONE HALF”h]”hŒ½”…”�”}”hj^sbah}”(h]”h ]”h"]”Œhalf”ah$]”h&]”uh1håh³hÖh´K hhh²hubhæ)�”}”(hŒ/.. |horbar| unicode:: U+02015 .. HORIZONTAL BAR”h]”hŒ―”…”�”}”hjmsbah}”(h]”h ]”h"]”Œhorbar”ah$]”h&]”uh1håh³hÖh´K!hhh²hubhæ)�”}”(hŒ'.. |hyphen| unicode:: U+02010 .. HYPHEN”h]”hŒâ€�”…”�”}”hj|sbah}”(h]”h ]”h"]”Œhyphen”ah$]”h&]”uh1håh³hÖh´K"hhh²hubhæ)�”}”(hŒ:.. |iexcl| unicode:: U+000A1 .. INVERTED EXCLAMATION MARK”h]”hŒ¡”…”�”}”hj‹sbah}”(h]”h ]”h"]”Œiexcl”ah$]”h&]”uh1håh³hÖh´K#hhh²hubhæ)�”}”(hŒ7.. |iquest| unicode:: U+000BF .. INVERTED QUESTION MARK”h]”hŒ¿”…”�”}”hjšsbah}”(h]”h ]”h"]”Œiquest”ah$]”h&]”uh1håh³hÖh´K$hhh²hubhæ)�”}”(hŒJ.. |laquo| unicode:: U+000AB .. LEFT-POINTING DOUBLE ANGLE QUOTATION MARK”h]”hŒ«”…”�”}”hj©sbah}”(h]”h ]”h"]”Œlaquo”ah$]”h&]”uh1håh³hÖh´K%hhh²hubhæ)�”}”(hŒ0.. |larr| unicode:: U+02190 .. LEFTWARDS ARROW”h]”hŒâ†�”…”�”}”hj¸sbah}”(h]”h ]”h"]”Œlarr”ah$]”h&]”uh1håh³hÖh´K&hhh²hubhæ)�”}”(hŒ3.. |lcub| unicode:: U+0007B .. LEFT CURLY BRACKET”h]”hŒ{”…”�”}”hjÇsbah}”(h]”h ]”h"]”Œlcub”ah$]”h&]”uh1håh³hÖh´K'hhh²hubhæ)�”}”(hŒ;.. |ldquo| unicode:: U+0201C .. LEFT DOUBLE QUOTATION MARK”h]”hŒ“”…”�”}”hjÖsbah}”(h]”h ]”h"]”Œldquo”ah$]”h&]”uh1håh³hÖh´K(hhh²hubhæ)�”}”(hŒ).. |lowbar| unicode:: U+0005F .. LOW LINE”h]”hŒ_”…”�”}”hjåsbah}”(h]”h ]”h"]”Œlowbar”ah$]”h&]”uh1håh³hÖh´K)hhh²hubhæ)�”}”(hŒ1.. |lpar| unicode:: U+00028 .. LEFT PARENTHESIS”h]”hŒ(”…”�”}”hjôsbah}”(h]”h ]”h"]”Œlpar”ah$]”h&]”uh1håh³hÖh´K*hhh²hubhæ)�”}”(hŒ4.. |lsqb| unicode:: U+0005B .. LEFT SQUARE BRACKET”h]”hŒ[”…”�”}”hjsbah}”(h]”h ]”h"]”Œlsqb”ah$]”h&]”uh1håh³hÖh´K+hhh²hubhæ)�”}”(hŒ;.. |lsquo| unicode:: U+02018 .. LEFT SINGLE QUOTATION MARK”h]”hŒ‘”…”�”}”hjsbah}”(h]”h ]”h"]”Œlsquo”ah$]”h&]”uh1håh³hÖh´K,hhh²hubhæ)�”}”(hŒ/.. |lt| unicode:: U+0003C .. LESS-THAN SIGN”h]”hŒ<”…”�”}”hj!sbah}”(h]”h ]”h"]”Œlt”ah$]”h&]”uh1håh³hÖh´K-hhh²hubhæ)�”}”(hŒ+.. |micro| unicode:: U+000B5 .. MICRO SIGN”h]”hŒµ”…”�”}”hj0sbah}”(h]”h ]”h"]”Œmicro”ah$]”h&]”uh1håh³hÖh´K.hhh²hubhæ)�”}”(hŒ+.. |middot| unicode:: U+000B7 .. MIDDLE DOT”h]”hŒ·”…”�”}”hj?sbah}”(h]”h ]”h"]”Œmiddot”ah$]”h&]”uh1håh³hÖh´K/hhh²hubhæ)�”}”(hŒ/.. |nbsp| unicode:: U+000A0 .. NO-BREAK SPACE”h]”hŒ ”…”�”}”hjNsbah}”(h]”h ]”h"]”Œnbsp”ah$]”h&]”uh1håh³hÖh´K0hhh²hubhæ)�”}”(hŒ).. |not| unicode:: U+000AC .. NOT SIGN”h]”hŒ¬”…”�”}”hj]sbah}”(h]”h ]”h"]”Œnot”ah$]”h&]”uh1håh³hÖh´K1hhh²hubhæ)�”}”(hŒ,.. |num| unicode:: U+00023 .. NUMBER SIGN”h]”hŒ#”…”�”}”hjlsbah}”(h]”h ]”h"]”Œnum”ah$]”h&]”uh1håh³hÖh´K2hhh²hubhæ)�”}”(hŒ).. |ohm| unicode:: U+02126 .. OHM SIGN”h]”hŒΩ”…”�”}”hj{sbah}”(h]”h ]”h"]”Œohm”ah$]”h&]”uh1håh³hÖh´K3hhh²hubhæ)�”}”(hŒ;.. |ordf| unicode:: U+000AA .. FEMININE ORDINAL INDICATOR”h]”hŒª”…”�”}”hjŠsbah}”(h]”h ]”h"]”Œordf”ah$]”h&]”uh1håh³hÖh´K4hhh²hubhæ)�”}”(hŒ<.. |ordm| unicode:: U+000BA .. MASCULINE ORDINAL INDICATOR”h]”hŒº”…”�”}”hj™sbah}”(h]”h ]”h"]”Œordm”ah$]”h&]”uh1håh³hÖh´K5hhh²hubhæ)�”}”(hŒ-.. |para| unicode:: U+000B6 .. PILCROW SIGN”h]”hŒ¶”…”�”}”hj¨sbah}”(h]”h ]”h"]”Œpara”ah$]”h&]”uh1håh³hÖh´K6hhh²hubhæ)�”}”(hŒ-.. |percnt| unicode:: U+00025 .. PERCENT SIGN”h]”hŒ%”…”�”}”hj·sbah}”(h]”h ]”h"]”Œpercnt”ah$]”h&]”uh1håh³hÖh´K7hhh²hubhæ)�”}”(hŒ*.. |period| unicode:: U+0002E .. FULL STOP”h]”hŒ.”…”�”}”hjÆsbah}”(h]”h ]”h"]”Œperiod”ah$]”h&]”uh1håh³hÖh´K8hhh²hubhæ)�”}”(hŒ*.. |plus| unicode:: U+0002B .. PLUS SIGN”h]”hŒ+”…”�”}”hjÕsbah}”(h]”h ]”h"]”Œplus”ah$]”h&]”uh1håh³hÖh´K9hhh²hubhæ)�”}”(hŒ0.. |plusmn| unicode:: U+000B1 .. PLUS-MINUS SIGN”h]”hŒ±”…”�”}”hjäsbah}”(h]”h ]”h"]”Œplusmn”ah$]”h&]”uh1håh³hÖh´K:hhh²hubhæ)�”}”(hŒ+.. |pound| unicode:: U+000A3 .. POUND SIGN”h]”hŒ£”…”�”}”hjósbah}”(h]”h ]”h"]”Œpound”ah$]”h&]”uh1håh³hÖh´K;hhh²hubhæ)�”}”(hŒ... |quest| unicode:: U+0003F .. QUESTION MARK”h]”hŒ?”…”�”}”hjsbah}”(h]”h ]”h"]”Œquest”ah$]”h&]”uh1håh³hÖh´Khhh²hubhæ)�”}”(hŒ1.. |rarr| unicode:: U+02192 .. RIGHTWARDS ARROW”h]”hŒ→”…”�”}”hj/sbah}”(h]”h ]”h"]”Œrarr”ah$]”h&]”uh1håh³hÖh´K?hhh²hubhæ)�”}”(hŒ4.. |rcub| unicode:: U+0007D .. RIGHT CURLY BRACKET”h]”hŒ}”…”�”}”hj>sbah}”(h]”h ]”h"]”Œrcub”ah$]”h&]”uh1håh³hÖh´K@hhh²hubhæ)�”}”(hŒ<.. |rdquo| unicode:: U+0201D .. RIGHT DOUBLE QUOTATION MARK”h]”hŒâ€�”…”�”}”hjMsbah}”(h]”h ]”h"]”Œrdquo”ah$]”h&]”uh1håh³hÖh´KAhhh²hubhæ)�”}”(hŒ0.. |reg| unicode:: U+000AE .. REGISTERED SIGN”h]”hŒ®”…”�”}”hj\sbah}”(h]”h ]”h"]”Œreg”ah$]”h&]”uh1håh³hÖh´KBhhh²hubhæ)�”}”(hŒ2.. |rpar| unicode:: U+00029 .. RIGHT PARENTHESIS”h]”hŒ)”…”�”}”hjksbah}”(h]”h ]”h"]”Œrpar”ah$]”h&]”uh1håh³hÖh´KChhh²hubhæ)�”}”(hŒ5.. |rsqb| unicode:: U+0005D .. RIGHT SQUARE BRACKET”h]”hŒ]”…”�”}”hjzsbah}”(h]”h ]”h"]”Œrsqb”ah$]”h&]”uh1håh³hÖh´KDhhh²hubhæ)�”}”(hŒ<.. |rsquo| unicode:: U+02019 .. RIGHT SINGLE QUOTATION MARK”h]”hŒ’”…”�”}”hj‰sbah}”(h]”h ]”h"]”Œrsquo”ah$]”h&]”uh1håh³hÖh´KEhhh²hubhæ)�”}”(hŒ-.. |sect| unicode:: U+000A7 .. SECTION SIGN”h]”hŒ§”…”�”}”hj˜sbah}”(h]”h ]”h"]”Œsect”ah$]”h&]”uh1håh³hÖh´KFhhh²hubhæ)�”}”(hŒ*.. |semi| unicode:: U+0003B .. SEMICOLON”h]”hŒ;”…”�”}”hj§sbah}”(h]”h ]”h"]”Œsemi”ah$]”h&]”uh1håh³hÖh´KGhhh²hubhæ)�”}”(hŒ,.. |shy| unicode:: U+000AD .. SOFT HYPHEN”h]”hŒ­”…”�”}”hj¶sbah}”(h]”h ]”h"]”Œshy”ah$]”h&]”uh1håh³hÖh´KHhhh²hubhæ)�”}”(hŒ(.. |sol| unicode:: U+0002F .. SOLIDUS”h]”hŒ/”…”�”}”hjÅsbah}”(h]”h ]”h"]”Œsol”ah$]”h&]”uh1håh³hÖh´KIhhh²hubhæ)�”}”(hŒ,.. |sung| unicode:: U+0266A .. EIGHTH NOTE”h]”hŒ♪”…”�”}”hjÔsbah}”(h]”h ]”h"]”Œsung”ah$]”h&]”uh1håh³hÖh´KJhhh²hubhæ)�”}”(hŒ0.. |sup1| unicode:: U+000B9 .. SUPERSCRIPT ONE”h]”hŒ¹”…”�”}”hjãsbah}”(h]”h ]”h"]”Œsup1”ah$]”h&]”uh1håh³hÖh´KKhhh²hubhæ)�”}”(hŒ0.. |sup2| unicode:: U+000B2 .. SUPERSCRIPT TWO”h]”hŒ²”…”�”}”hjòsbah}”(h]”h ]”h"]”Œsup2”ah$]”h&]”uh1håh³hÖh´KLhhh²hubhæ)�”}”(hŒ2.. |sup3| unicode:: U+000B3 .. SUPERSCRIPT THREE”h]”hŒ³”…”�”}”hjsbah}”(h]”h ]”h"]”Œsup3”ah$]”h&]”uh1håh³hÖh´KMhhh²hubhæ)�”}”(hŒ4.. |times| unicode:: U+000D7 .. MULTIPLICATION SIGN”h]”hŒ×”…”�”}”hjsbah}”(h]”h ]”h"]”Œtimes”ah$]”h&]”uh1håh³hÖh´KNhhh²hubhæ)�”}”(hŒ0.. |trade| unicode:: U+02122 .. TRADE MARK SIGN”h]”hŒâ„¢”…”�”}”hjsbah}”(h]”h ]”h"]”Œtrade”ah$]”h&]”uh1håh³hÖh´KOhhh²hubhæ)�”}”(hŒ... |uarr| unicode:: U+02191 .. UPWARDS ARROW”h]”hŒ↑”…”�”}”hj.sbah}”(h]”h ]”h"]”Œuarr”ah$]”h&]”uh1håh³hÖh´KPhhh²hubhæ)�”}”(hŒ... |verbar| unicode:: U+0007C .. VERTICAL LINE”h]”hŒ|”…”�”}”hj=sbah}”(h]”h ]”h"]”Œverbar”ah$]”h&]”uh1håh³hÖh´KQhhh²hubhæ)�”}”(hŒ*.. |yen| unicode:: U+000A5 .. YEN SIGN ”h]”hŒÂ¥”…”�”}”hjLsbah}”(h]”h ]”h"]”Œyen”ah$]”h&]”uh1håh³hÖh´KRhhh²hubhæ)�”}”(hŒR.. |struct cpuidle_state| replace:: :c:type:`struct cpuidle_state `”h]”h)�”}”(hŒ.:c:type:`struct cpuidle_state `”h]”hŒliteral”“”)�”}”(hjah]”hŒstruct cpuidle_state”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œc”Œc-type”eh"]”h$]”h&]”uh1jchj_ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œadmin-guide/pm/cpuidle”Œ refdomain”jpŒreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰Œ reftarget”Œ cpuidle_state”uh1hh³hÇh´Khj[ubah}”(h]”h ]”h"]”Œstruct cpuidle_state”ah$]”h&]”uh1håh³hÇh´Khhh²hubhæ)�”}”(hŒ@.. |cpufreq| replace:: :doc:`CPU Performance Scaling ` ”h]”h)�”}”(hŒ(:doc:`CPU Performance Scaling `”h]”hŒinline”“”)�”}”(hj‘h]”hŒCPU Performance Scaling”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”(joŒstd”Œstd-doc”eh"]”h$]”h&]”uh1j“hj�ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j|Œ refdomain”jŸŒreftype”Œdoc”Œ refexplicit”ˆŒrefwarn”ˆj‚Œcpufreq”uh1hh³hÇh´Khj‹ubah}”(h]”h ]”h"]”Œcpufreq”ah$]”h&]”uh1håh³hÇh´Khhh²hubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒCPU Idle Time Management”h]”hŒCPU Idle Time Management”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hjºh²hh³hÇh´K ubhŒ field_list”“”)�”}”(hhh]”(hŒfield”“”)�”}”(hhh]”(hŒ field_name”“”)�”}”(hŒ Copyright”h]”hŒ Copyright”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j×hjÔh³hÇh´KubhŒ field_body”“”)�”}”(hŒ|copy| 2018 Intel Corporation ”h]”hŒ paragraph”“”)�”}”(hŒ|copy| 2018 Intel Corporation”h]”(hŒ©”…”�”}”(hjïh²hh³Nh´NubhŒ 2018 Intel Corporation”…”�”}”(hjïh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K hjéubah}”(h]”h ]”h"]”h$]”h&]”uh1jçhjÔubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÇh´K hjÏh²hubjÓ)�”}”(hhh]”(jØ)�”}”(hŒAuthor”h]”hŒAuthor”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j×hj h³hÇh´Kubjè)�”}”(hŒ0Rafael J. Wysocki ”h]”jî)�”}”(hŒ.Rafael J. Wysocki ”h]”(hŒRafael J. Wysocki <”…”�”}”(hj"h²hh³Nh´NubhŒ reference”“”)�”}”(hŒrafael.j.wysocki@intel.com”h]”hŒrafael.j.wysocki@intel.com”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œ!mailto:rafael.j.wysocki@intel.com”uh1j*hj"ubhŒ>”…”�”}”(hj"h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jçhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÒh³hÇh´K hjÏh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÍhjºh²hh³hÇh´K ubj¹)�”}”(hhh]”(j¾)�”}”(hŒConcepts”h]”hŒConcepts”…”�”}”(hj[h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hjXh²hh³hÇh´Kubjî)�”}”(hŒåModern processors are generally able to enter states in which the execution of a program is suspended and instructions belonging to it are not fetched from memory or executed. Those states are the *idle* states of the processor.”h]”(hŒÆModern processors are generally able to enter states in which the execution of a program is suspended and instructions belonging to it are not fetched from memory or executed. Those states are the ”…”�”}”(hjih²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*idle*”h]”hŒidle”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjiubhŒ states of the processor.”…”�”}”(hjih²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KhjXh²hubjî)�”}”(hŒÄSince part of the processor hardware is not used in idle states, entering them generally allows power drawn by the processor to be reduced and, in consequence, it is an opportunity to save energy.”h]”hŒÄSince part of the processor hardware is not used in idle states, entering them generally allows power drawn by the processor to be reduced and, in consequence, it is an opportunity to save energy.”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KhjXh²hubjî)�”}”(hŒ~CPU idle time management is an energy-efficiency feature concerned about using the idle states of processors for this purpose.”h]”hŒ~CPU idle time management is an energy-efficiency feature concerned about using the idle states of processors for this purpose.”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KhjXh²hubj¹)�”}”(hhh]”(j¾)�”}”(hŒ Logical CPUs”h]”hŒ Logical CPUs”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hj§h²hh³hÇh´Kubjî)�”}”(hXZCPU idle time management operates on CPUs as seen by the *CPU scheduler* (that is the part of the kernel responsible for the distribution of computational work in the system). In its view, CPUs are *logical* units. That is, they need not be separate physical entities and may just be interfaces appearing to software as individual single-core processors. In other words, a CPU is an entity which appears to be fetching instructions that belong to one sequence (program) from memory and executing them, but it need not work this way physically. Generally, three different cases can be consider here.”h]”(hŒ9CPU idle time management operates on CPUs as seen by the ”…”�”}”(hj¸h²hh³Nh´Nubjr)�”}”(hŒ*CPU scheduler*”h]”hŒ CPU scheduler”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj¸ubhŒ (that is the part of the kernel responsible for the distribution of computational work in the system). In its view, CPUs are ”…”�”}”(hj¸h²hh³Nh´Nubjr)�”}”(hŒ *logical*”h]”hŒlogical”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj¸ubhXŠ units. That is, they need not be separate physical entities and may just be interfaces appearing to software as individual single-core processors. In other words, a CPU is an entity which appears to be fetching instructions that belong to one sequence (program) from memory and executing them, but it need not work this way physically. Generally, three different cases can be consider here.”…”�”}”(hj¸h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K!hj§h²hubjî)�”}”(hŒÚFirst, if the whole processor can only follow one sequence of instructions (one program) at a time, it is a CPU. In that case, if the hardware is asked to enter an idle state, that applies to the processor as a whole.”h]”hŒÚFirst, if the whole processor can only follow one sequence of instructions (one program) at a time, it is a CPU. In that case, if the hardware is asked to enter an idle state, that applies to the processor as a whole.”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K*hj§h²hubjî)�”}”(hX Second, if the processor is multi-core, each core in it is able to follow at least one program at a time. The cores need not be entirely independent of each other (for example, they may share caches), but still most of the time they work physically in parallel with each other, so if each of them executes only one program, those programs run mostly independently of each other at the same time. The entire cores are CPUs in that case and if the hardware is asked to enter an idle state, that applies to the core that asked for it in the first place, but it also may apply to a larger unit (say a "package" or a "cluster") that the core belongs to (in fact, it may apply to an entire hierarchy of larger units containing the core). Namely, if all of the cores in the larger unit except for one have been put into idle states at the "core level" and the remaining core asks the processor to enter an idle state, that may trigger it to put the whole larger unit into an idle state which also will affect the other cores in that unit.”h]”hXSecond, if the processor is multi-core, each core in it is able to follow at least one program at a time. The cores need not be entirely independent of each other (for example, they may share caches), but still most of the time they work physically in parallel with each other, so if each of them executes only one program, those programs run mostly independently of each other at the same time. The entire cores are CPUs in that case and if the hardware is asked to enter an idle state, that applies to the core that asked for it in the first place, but it also may apply to a larger unit (say a “packageâ€� or a “clusterâ€�) that the core belongs to (in fact, it may apply to an entire hierarchy of larger units containing the core). Namely, if all of the cores in the larger unit except for one have been put into idle states at the “core levelâ€� and the remaining core asks the processor to enter an idle state, that may trigger it to put the whole larger unit into an idle state which also will affect the other cores in that unit.”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K.hj§h²hubjî)�”}”(hXqFinally, each core in a multi-core processor may be able to follow more than one program in the same time frame (that is, each core may be able to fetch instructions from multiple locations in memory and execute them in the same time frame, but not necessarily entirely in parallel with each other). In that case the cores present themselves to software as "bundles" each consisting of multiple individual single-core "processors", referred to as *hardware threads* (or hyper-threads specifically on Intel hardware), that each can follow one sequence of instructions. Then, the hardware threads are CPUs from the CPU idle time management perspective and if the processor is asked to enter an idle state by one of them, the hardware thread (or CPU) that asked for it is stopped, but nothing more happens, unless all of the other hardware threads within the same core also have asked the processor to enter an idle state. In that situation, the core may be put into an idle state individually or a larger unit containing it may be put into an idle state as a whole (if the other cores within the larger unit are in idle states already).”h]”(hXÈFinally, each core in a multi-core processor may be able to follow more than one program in the same time frame (that is, each core may be able to fetch instructions from multiple locations in memory and execute them in the same time frame, but not necessarily entirely in parallel with each other). In that case the cores present themselves to software as “bundlesâ€� each consisting of multiple individual single-core “processorsâ€�, referred to as ”…”�”}”(hjh²hh³Nh´Nubjr)�”}”(hŒ*hardware threads*”h]”hŒhardware threads”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjubhXŸ (or hyper-threads specifically on Intel hardware), that each can follow one sequence of instructions. Then, the hardware threads are CPUs from the CPU idle time management perspective and if the processor is asked to enter an idle state by one of them, the hardware thread (or CPU) that asked for it is stopped, but nothing more happens, unless all of the other hardware threads within the same core also have asked the processor to enter an idle state. In that situation, the core may be put into an idle state individually or a larger unit containing it may be put into an idle state as a whole (if the other cores within the larger unit are in idle states already).”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K=hj§h²hubeh}”(h]”Œ logical-cpus”ah ]”h"]”Œ logical cpus”ah$]”h&]”uh1j¸hjXh²hh³hÇh´Kubj¹)�”}”(hhh]”(j¾)�”}”(hŒ Idle CPUs”h]”hŒ Idle CPUs”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hj.h²hh³hÇh´KNubjî)�”}”(hŒ±Logical CPUs, simply referred to as "CPUs" in what follows, are regarded as *idle* by the Linux kernel when there are no tasks to run on them except for the special "idle" task.”h]”(hŒPLogical CPUs, simply referred to as “CPUsâ€� in what follows, are regarded as ”…”�”}”(hj?h²hh³Nh´Nubjr)�”}”(hŒ*idle*”h]”hŒidle”…”�”}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj?ubhŒc by the Linux kernel when there are no tasks to run on them except for the special “idleâ€� task.”…”�”}”(hj?h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KPhj.h²hubjî)�”}”(hX�Tasks are the CPU scheduler's representation of work. Each task consists of a sequence of instructions to execute, or code, data to be manipulated while running that code, and some context information that needs to be loaded into the processor every time the task's code is run by a CPU. The CPU scheduler distributes work by assigning tasks to run to the CPUs present in the system.”h]”hX…Tasks are the CPU scheduler’s representation of work. Each task consists of a sequence of instructions to execute, or code, data to be manipulated while running that code, and some context information that needs to be loaded into the processor every time the task’s code is run by a CPU. The CPU scheduler distributes work by assigning tasks to run to the CPUs present in the system.”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KThj.h²hubjî)�”}”(hXòTasks can be in various states. In particular, they are *runnable* if there are no specific conditions preventing their code from being run by a CPU as long as there is a CPU available for that (for example, they are not waiting for any events to occur or similar). When a task becomes runnable, the CPU scheduler assigns it to one of the available CPUs to run and if there are no more runnable tasks assigned to it, the CPU will load the given task's context and run its code (from the instruction following the last one executed so far, possibly by another CPU). [If there are multiple runnable tasks assigned to one CPU simultaneously, they will be subject to prioritization and time sharing in order to allow them to make some progress over time.]”h]”(hŒ9Tasks can be in various states. In particular, they are ”…”�”}”(hjmh²hh³Nh´Nubjr)�”}”(hŒ *runnable*”h]”hŒrunnable”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjmubhX± if there are no specific conditions preventing their code from being run by a CPU as long as there is a CPU available for that (for example, they are not waiting for any events to occur or similar). When a task becomes runnable, the CPU scheduler assigns it to one of the available CPUs to run and if there are no more runnable tasks assigned to it, the CPU will load the given task’s context and run its code (from the instruction following the last one executed so far, possibly by another CPU). [If there are multiple runnable tasks assigned to one CPU simultaneously, they will be subject to prioritization and time sharing in order to allow them to make some progress over time.]”…”�”}”(hjmh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KZhj.h²hubjî)�”}”(hXÃThe special "idle" task becomes runnable if there are no other runnable tasks assigned to the given CPU and the CPU is then regarded as idle. In other words, in Linux idle CPUs run the code of the "idle" task called *the idle loop*. That code may cause the processor to be put into one of its idle states, if they are supported, in order to save energy, but if the processor does not support any idle states, or there is not enough time to spend in an idle state before the next wakeup event, or there are strict latency constraints preventing any of the available idle states from being used, the CPU will simply execute more or less useless instructions in a loop until it is assigned a new task to run.”h]”(hŒáThe special “idleâ€� task becomes runnable if there are no other runnable tasks assigned to the given CPU and the CPU is then regarded as idle. In other words, in Linux idle CPUs run the code of the “idleâ€� task called ”…”�”}”(hj�h²hh³Nh´Nubjr)�”}”(hŒ*the idle loop*”h]”hŒ the idle loop”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj�ubhXÛ. That code may cause the processor to be put into one of its idle states, if they are supported, in order to save energy, but if the processor does not support any idle states, or there is not enough time to spend in an idle state before the next wakeup event, or there are strict latency constraints preventing any of the available idle states from being used, the CPU will simply execute more or less useless instructions in a loop until it is assigned a new task to run.”…”�”}”(hj�h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Kehj.h²hubhŒtarget”“”)�”}”(hŒ.. _idle-loop:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œ idle-loop”uh1j­h´KÆhj.h²hh³hÇŒ referenced”Kubeh}”(h]”Œ idle-cpus”ah ]”h"]”Œ idle cpus”ah$]”h&]”uh1j¸hjXh²hh³hÇh´KNubeh}”(h]”Œconcepts”ah ]”h"]”Œconcepts”ah$]”h&]”uh1j¸hjºh²hh³hÇh´Kubj¹)�”}”(hhh]”(j¾)�”}”(hŒ The Idle Loop”h]”hŒ The Idle Loop”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hjÌh²hh³hÇh´Ksubjî)�”}”(hXÆThe idle loop code takes two major steps in every iteration of it. First, it calls into a code module referred to as the *governor* that belongs to the CPU idle time management subsystem called ``CPUIdle`` to select an idle state for the CPU to ask the hardware to enter. Second, it invokes another code module from the ``CPUIdle`` subsystem, called the *driver*, to actually ask the processor hardware to enter the idle state selected by the governor.”h]”(hŒzThe idle loop code takes two major steps in every iteration of it. First, it calls into a code module referred to as the ”…”�”}”(hjÝh²hh³Nh´Nubjr)�”}”(hŒ *governor*”h]”hŒgovernor”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjÝubhŒ? that belongs to the CPU idle time management subsystem called ”…”�”}”(hjÝh²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÝubhŒt to select an idle state for the CPU to ask the hardware to enter. Second, it invokes another code module from the ”…”�”}”(hjÝh²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÝubhŒ subsystem, called the ”…”�”}”(hjÝh²hh³Nh´Nubjr)�”}”(hŒ*driver*”h]”hŒdriver”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjÝubhŒZ, to actually ask the processor hardware to enter the idle state selected by the governor.”…”�”}”(hjÝh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KuhjÌh²hubjî)�”}”(hXdThe role of the governor is to find an idle state most suitable for the conditions at hand. For this purpose, idle states that the hardware can be asked to enter by logical CPUs are represented in an abstract way independent of the platform or the processor architecture and organized in a one-dimensional (linear) array. That array has to be prepared and supplied by the ``CPUIdle`` driver matching the platform the kernel is running on at the initialization time. This allows ``CPUIdle`` governors to be independent of the underlying hardware and to work with any platforms that the Linux kernel can run on.”h]”(hXvThe role of the governor is to find an idle state most suitable for the conditions at hand. For this purpose, idle states that the hardware can be asked to enter by logical CPUs are represented in an abstract way independent of the platform or the processor architecture and organized in a one-dimensional (linear) array. That array has to be prepared and supplied by the ”…”�”}”(hj3h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj3ubhŒ` driver matching the platform the kernel is running on at the initialization time. This allows ”…”�”}”(hj3h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj3ubhŒx governors to be independent of the underlying hardware and to work with any platforms that the Linux kernel can run on.”…”�”}”(hj3h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K|hjÌh²hubjî)�”}”(hX´Each idle state present in that array is characterized by two parameters to be taken into account by the governor, the *target residency* and the (worst-case) *exit latency*. The target residency is the minimum time the hardware must spend in the given state, including the time needed to enter it (which may be substantial), in order to save more energy than it would save by entering one of the shallower idle states instead. [The "depth" of an idle state roughly corresponds to the power drawn by the processor in that state.] The exit latency, in turn, is the maximum time it will take a CPU asking the processor hardware to enter an idle state to start executing the first instruction after a wakeup from that state. Note that in general the exit latency also must cover the time needed to enter the given state in case the wakeup occurs when the hardware is entering it and it must be entered completely to be exited in an ordered manner.”h]”(hŒwEach idle state present in that array is characterized by two parameters to be taken into account by the governor, the ”…”�”}”(hjeh²hh³Nh´Nubjr)�”}”(hŒ*target residency*”h]”hŒtarget residency”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjeubhŒ and the (worst-case) ”…”�”}”(hjeh²hh³Nh´Nubjr)�”}”(hŒ*exit latency*”h]”hŒ exit latency”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjeubhX . The target residency is the minimum time the hardware must spend in the given state, including the time needed to enter it (which may be substantial), in order to save more energy than it would save by entering one of the shallower idle states instead. [The “depthâ€� of an idle state roughly corresponds to the power drawn by the processor in that state.] The exit latency, in turn, is the maximum time it will take a CPU asking the processor hardware to enter an idle state to start executing the first instruction after a wakeup from that state. Note that in general the exit latency also must cover the time needed to enter the given state in case the wakeup occurs when the hardware is entering it and it must be entered completely to be exited in an ordered manner.”…”�”}”(hjeh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K…hjÌh²hubjî)�”}”(hXThere are two types of information that can influence the governor's decisions. First of all, the governor knows the time until the closest timer event. That time is known exactly, because the kernel programs timers and it knows exactly when they will trigger, and it is the maximum time the hardware that the given CPU depends on can spend in an idle state, including the time necessary to enter and exit it. However, the CPU may be woken up by a non-timer event at any time (in particular, before the closest timer triggers) and it generally is not known when that may happen. The governor can only see how much time the CPU actually was idle after it has been woken up (that time will be referred to as the *idle duration* from now on) and it can use that information somehow along with the time until the closest timer to estimate the idle duration in future. How the governor uses that information depends on what algorithm is implemented by it and that is the primary reason for having more than one governor in the ``CPUIdle`` subsystem.”h]”(hXËThere are two types of information that can influence the governor’s decisions. First of all, the governor knows the time until the closest timer event. That time is known exactly, because the kernel programs timers and it knows exactly when they will trigger, and it is the maximum time the hardware that the given CPU depends on can spend in an idle state, including the time necessary to enter and exit it. However, the CPU may be woken up by a non-timer event at any time (in particular, before the closest timer triggers) and it generally is not known when that may happen. The governor can only see how much time the CPU actually was idle after it has been woken up (that time will be referred to as the ”…”�”}”(hj—h²hh³Nh´Nubjr)�”}”(hŒ*idle duration*”h]”hŒ idle duration”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj—ubhX* from now on) and it can use that information somehow along with the time until the closest timer to estimate the idle duration in future. How the governor uses that information depends on what algorithm is implemented by it and that is the primary reason for having more than one governor in the ”…”�”}”(hj—h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj—ubhŒ subsystem.”…”�”}”(hj—h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K“hjÌh²hubjî)�”}”(hXlThere are four ``CPUIdle`` governors available, ``menu``, `TEO `_, ``ladder`` and ``haltpoll``. Which of them is used by default depends on the configuration of the kernel and in particular on whether or not the scheduler tick can be `stopped by the idle loop `_. Available governors can be read from the :file:`available_governors`, and the governor can be changed at runtime. The name of the ``CPUIdle`` governor currently used by the kernel can be read from the :file:`current_governor_ro` or :file:`current_governor` file under :file:`/sys/devices/system/cpu/cpuidle/` in ``sysfs``.”h]”(hŒThere are four ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÉubhŒ governors available, ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ``menu``”h]”hŒmenu”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÉubhŒ, ”…”�”}”(hjÉh²hh³Nh´Nubj+)�”}”(hŒ`TEO `_”h]”hŒTEO”…”�”}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒTEO”j¹Œteo-gov”uh1j*hjÉŒresolved”Kubj®)�”}”(hŒ ”h]”h}”(h]”h ]”h"]”Œteo”ah$]”h&]”j¹j uh1j­Œindirect_reference_name”Œteo-gov”hjÉj KubhŒ, ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ ``ladder``”h]”hŒladder”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÉubhŒ and ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ ``haltpoll``”h]”hŒhaltpoll”…”�”}”(hj* h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÉubhŒ�. Which of them is used by default depends on the configuration of the kernel and in particular on whether or not the scheduler tick can be ”…”�”}”(hjÉh²hh³Nh´Nubj+)�”}”(hŒ1`stopped by the idle loop `_”h]”hŒstopped by the idle loop”…”�”}”(hj< h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œstopped by the idle loop”j¹Œidle-cpus-and-tick”uh1j*hjÉj Kubj®)�”}”(hŒ ”h]”h}”(h]”h ]”h"]”Œstopped by the idle loop”ah$]”h&]”j¹jL uh1j­j Œidle-cpus-and-tick”hjÉj KubhŒ,. Available governors can be read from the ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ:file:`available_governors`”h]”hŒavailable_governors”…”�”}”(hj] h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÉubhŒ?, and the governor can be changed at runtime. The name of the ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÉubhŒ< governor currently used by the kernel can be read from the ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ:file:`current_governor_ro`”h]”hŒcurrent_governor_ro”…”�”}”(hj„ h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÉubhŒ or ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ:file:`current_governor`”h]”hŒcurrent_governor”…”�”}”(hj™ h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÉubhŒ file under ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ(:file:`/sys/devices/system/cpu/cpuidle/`”h]”hŒ /sys/devices/system/cpu/cpuidle/”…”�”}”(hj® h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÉubhŒ in ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hjà h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÉubhŒ.”…”�”}”(hjÉh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K¢hjÌh²hubjî)�”}”(hX—Which ``CPUIdle`` driver is used, on the other hand, usually depends on the platform the kernel is running on, but there are platforms with more than one matching driver. For example, there are two drivers that can work with the majority of Intel platforms, ``intel_idle`` and ``acpi_idle``, one with hardcoded idle states information and the other able to read that information from the system's ACPI tables, respectively. Still, even in those cases, the driver chosen at the system initialization time cannot be replaced later, so the decision on which one of them to use has to be made early (on Intel platforms the ``acpi_idle`` driver will be used if ``intel_idle`` is disabled for some reason or if it does not recognize the processor). The name of the ``CPUIdle`` driver currently used by the kernel can be read from the :file:`current_driver` file under :file:`/sys/devices/system/cpu/cpuidle/` in ``sysfs``.”h]”(hŒWhich ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjã h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÛ ubhŒò driver is used, on the other hand, usually depends on the platform the kernel is running on, but there are platforms with more than one matching driver. For example, there are two drivers that can work with the majority of Intel platforms, ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ``intel_idle``”h]”hŒ intel_idle”…”�”}”(hjõ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÛ ubhŒ and ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÛ ubhXL, one with hardcoded idle states information and the other able to read that information from the system’s ACPI tables, respectively. Still, even in those cases, the driver chosen at the system initialization time cannot be replaced later, so the decision on which one of them to use has to be made early (on Intel platforms the ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÛ ubhŒ driver will be used if ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ``intel_idle``”h]”hŒ intel_idle”…”�”}”(hj+ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÛ ubhŒZ is disabled for some reason or if it does not recognize the processor). The name of the ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hj= h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÛ ubhŒ: driver currently used by the kernel can be read from the ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ:file:`current_driver`”h]”hŒcurrent_driver”…”�”}”(hjO h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÛ ubhŒ file under ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ(:file:`/sys/devices/system/cpu/cpuidle/`”h]”hŒ /sys/devices/system/cpu/cpuidle/”…”�”}”(hjd h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÛ ubhŒ in ”…”�”}”(hjÛ h²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hjy h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÛ ubhŒ.”…”�”}”(hjÛ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K¬hjÌh²hubj®)�”}”(hŒ.. _idle-cpus-and-tick:”h]”h}”(h]”h ]”h"]”h$]”h&]”j¹jL uh1j­h´MhjÌh²hh³hÇj»Kubeh}”(h]”(Œ the-idle-loop”jºeh ]”h"]”(Œ the idle loop”Œ idle-loop”eh$]”h&]”uh1j¸hjºh²hh³hÇh´KsŒexpect_referenced_by_name”}”j¡ j¯sŒexpect_referenced_by_id”}”jºj¯sj»Kubj¹)�”}”(hhh]”(j¾)�”}”(hŒ Idle CPUs and The Scheduler Tick”h]”hŒ Idle CPUs and The Scheduler Tick”…”�”}”(hj« h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hj¨ h²hh³hÇh´K½ubjî)�”}”(hX@The scheduler tick is a timer that triggers periodically in order to implement the time sharing strategy of the CPU scheduler. Of course, if there are multiple runnable tasks assigned to one CPU at the same time, the only way to allow them to make reasonable progress in a given time frame is to make them share the available CPU time. Namely, in rough approximation, each task is given a slice of the CPU time to run its code, subject to the scheduling class, prioritization and so on and when that time slice is used up, the CPU should be switched over to running (the code of) another task. The currently running task may not want to give the CPU away voluntarily, however, and the scheduler tick is there to make the switch happen regardless. That is not the only role of the tick, but it is the primary reason for using it.”h]”hX@The scheduler tick is a timer that triggers periodically in order to implement the time sharing strategy of the CPU scheduler. Of course, if there are multiple runnable tasks assigned to one CPU at the same time, the only way to allow them to make reasonable progress in a given time frame is to make them share the available CPU time. Namely, in rough approximation, each task is given a slice of the CPU time to run its code, subject to the scheduling class, prioritization and so on and when that time slice is used up, the CPU should be switched over to running (the code of) another task. The currently running task may not want to give the CPU away voluntarily, however, and the scheduler tick is there to make the switch happen regardless. That is not the only role of the tick, but it is the primary reason for using it.”…”�”}”(hj¹ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´K¿hj¨ h²hubjî)�”}”(hXiThe scheduler tick is problematic from the CPU idle time management perspective, because it triggers periodically and relatively often (depending on the kernel configuration, the length of the tick period is between 1 ms and 10 ms). Thus, if the tick is allowed to trigger on idle CPUs, it will not make sense for them to ask the hardware to enter idle states with target residencies above the tick period length. Moreover, in that case the idle duration of any CPU will never exceed the tick period length and the energy used for entering and exiting idle states due to the tick wakeups on idle CPUs will be wasted.”h]”hXiThe scheduler tick is problematic from the CPU idle time management perspective, because it triggers periodically and relatively often (depending on the kernel configuration, the length of the tick period is between 1 ms and 10 ms). Thus, if the tick is allowed to trigger on idle CPUs, it will not make sense for them to ask the hardware to enter idle states with target residencies above the tick period length. Moreover, in that case the idle duration of any CPU will never exceed the tick period length and the energy used for entering and exiting idle states due to the tick wakeups on idle CPUs will be wasted.”…”�”}”(hjÇ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KËhj¨ h²hubjî)�”}”(hXCFortunately, it is not really necessary to allow the tick to trigger on idle CPUs, because (by definition) they have no tasks to run except for the special "idle" one. In other words, from the CPU scheduler perspective, the only user of the CPU time on them is the idle loop. Since the time of an idle CPU need not be shared between multiple runnable tasks, the primary reason for using the tick goes away if the given CPU is idle. Consequently, it is possible to stop the scheduler tick entirely on idle CPUs in principle, even though that may not always be worth the effort.”h]”hXGFortunately, it is not really necessary to allow the tick to trigger on idle CPUs, because (by definition) they have no tasks to run except for the special “idleâ€� one. In other words, from the CPU scheduler perspective, the only user of the CPU time on them is the idle loop. Since the time of an idle CPU need not be shared between multiple runnable tasks, the primary reason for using the tick goes away if the given CPU is idle. Consequently, it is possible to stop the scheduler tick entirely on idle CPUs in principle, even though that may not always be worth the effort.”…”�”}”(hjÕ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KÔhj¨ h²hubjî)�”}”(hX­Whether or not it makes sense to stop the scheduler tick in the idle loop depends on what is expected by the governor. First, if there is another (non-tick) timer due to trigger within the tick range, stopping the tick clearly would be a waste of time, even though the timer hardware may not need to be reprogrammed in that case. Second, if the governor is expecting a non-timer wakeup within the tick range, stopping the tick is not necessary and it may even be harmful. Namely, in that case the governor will select an idle state with the target residency within the time until the expected wakeup, so that state is going to be relatively shallow. The governor really cannot select a deep idle state then, as that would contradict its own expectation of a wakeup in short order. Now, if the wakeup really occurs shortly, stopping the tick would be a waste of time and in this case the timer hardware would need to be reprogrammed, which is expensive. On the other hand, if the tick is stopped and the wakeup does not occur any time soon, the hardware may spend indefinite amount of time in the shallow idle state selected by the governor, which will be a waste of energy. Hence, if the governor is expecting a wakeup of any kind within the tick range, it is better to allow the tick trigger. Otherwise, however, the governor will select a relatively deep idle state, so the tick should be stopped so that it does not wake up the CPU too early.”h]”hX­Whether or not it makes sense to stop the scheduler tick in the idle loop depends on what is expected by the governor. First, if there is another (non-tick) timer due to trigger within the tick range, stopping the tick clearly would be a waste of time, even though the timer hardware may not need to be reprogrammed in that case. Second, if the governor is expecting a non-timer wakeup within the tick range, stopping the tick is not necessary and it may even be harmful. Namely, in that case the governor will select an idle state with the target residency within the time until the expected wakeup, so that state is going to be relatively shallow. The governor really cannot select a deep idle state then, as that would contradict its own expectation of a wakeup in short order. Now, if the wakeup really occurs shortly, stopping the tick would be a waste of time and in this case the timer hardware would need to be reprogrammed, which is expensive. On the other hand, if the tick is stopped and the wakeup does not occur any time soon, the hardware may spend indefinite amount of time in the shallow idle state selected by the governor, which will be a waste of energy. Hence, if the governor is expecting a wakeup of any kind within the tick range, it is better to allow the tick trigger. Otherwise, however, the governor will select a relatively deep idle state, so the tick should be stopped so that it does not wake up the CPU too early.”…”�”}”(hjã h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´KÝhj¨ h²hubjî)�”}”(hX0In any case, the governor knows what it is expecting and the decision on whether or not to stop the scheduler tick belongs to it. Still, if the tick has been stopped already (in one of the previous iterations of the loop), it is better to leave it as is and the governor needs to take that into account.”h]”hX0In any case, the governor knows what it is expecting and the decision on whether or not to stop the scheduler tick belongs to it. Still, if the tick has been stopped already (in one of the previous iterations of the loop), it is better to leave it as is and the governor needs to take that into account.”…”�”}”(hjñ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Kñhj¨ h²hubjî)�”}”(hXÂThe kernel can be configured to disable stopping the scheduler tick in the idle loop altogether. That can be done through the build-time configuration of it (by unsetting the ``CONFIG_NO_HZ_IDLE`` configuration option) or by passing ``nohz=off`` to it in the command line. In both cases, as the stopping of the scheduler tick is disabled, the governor's decisions regarding it are simply ignored by the idle loop code and the tick is never stopped.”h]”(hŒ°The kernel can be configured to disable stopping the scheduler tick in the idle loop altogether. That can be done through the build-time configuration of it (by unsetting the ”…”�”}”(hjÿ h²hh³Nh´Nubjd)�”}”(hŒ``CONFIG_NO_HZ_IDLE``”h]”hŒCONFIG_NO_HZ_IDLE”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÿ ubhŒ% configuration option) or by passing ”…”�”}”(hjÿ h²hh³Nh´Nubjd)�”}”(hŒ ``nohz=off``”h]”hŒnohz=off”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÿ ubhŒÎ to it in the command line. In both cases, as the stopping of the scheduler tick is disabled, the governor’s decisions regarding it are simply ignored by the idle loop code and the tick is never stopped.”…”�”}”(hjÿ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Köhj¨ h²hubjî)�”}”(hX¨The systems that run kernels configured to allow the scheduler tick to be stopped on idle CPUs are referred to as *tickless* systems and they are generally regarded as more energy-efficient than the systems running kernels in which the tick cannot be stopped. If the given system is tickless, it will use the ``menu`` governor by default and if it is not tickless, the default ``CPUIdle`` governor on it will be ``ladder``.”h]”(hŒrThe systems that run kernels configured to allow the scheduler tick to be stopped on idle CPUs are referred to as ”…”�”}”(hj1 h²hh³Nh´Nubjr)�”}”(hŒ *tickless*”h]”hŒtickless”…”�”}”(hj9 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj1 ubhŒº systems and they are generally regarded as more energy-efficient than the systems running kernels in which the tick cannot be stopped. If the given system is tickless, it will use the ”…”�”}”(hj1 h²hh³Nh´Nubjd)�”}”(hŒ``menu``”h]”hŒmenu”…”�”}”(hjK h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj1 ubhŒ< governor by default and if it is not tickless, the default ”…”�”}”(hj1 h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hj] h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj1 ubhŒ governor on it will be ”…”�”}”(hj1 h²hh³Nh´Nubjd)�”}”(hŒ ``ladder``”h]”hŒladder”…”�”}”(hjo h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj1 ubhŒ.”…”�”}”(hj1 h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Kýhj¨ h²hubj®)�”}”(hŒ .. _menu-gov:”h]”h}”(h]”h ]”h"]”h$]”h&]”j¹Œmenu-gov”uh1j­h´M[hj¨ h²hh³hÇj»Kubeh}”(h]”(jL Œ idle-cpus-and-the-scheduler-tick”eh ]”h"]”(Œ idle cpus and the scheduler tick”Œidle-cpus-and-tick”eh$]”h&]”uh1j¸hjºh²hh³hÇh´K½j¤ }”j˜ j‘ sj¦ }”jL j‘ sj»Kubj¹)�”}”(hhh]”(j¾)�”}”(hŒThe ``menu`` Governor”h]”(hŒThe ”…”�”}”(hj  h²hh³Nh´Nubjd)�”}”(hŒ``menu``”h]”hŒmenu”…”�”}”(hj¨ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj  ubhŒ Governor”…”�”}”(hj  h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hj� h²hh³hÇh´Mubjî)�”}”(hX�The ``menu`` governor is the default ``CPUIdle`` governor for tickless systems. It is quite complex, but the basic principle of its design is straightforward. Namely, when invoked to select an idle state for a CPU (i.e. an idle state that the CPU will ask the processor hardware to enter), it attempts to predict the idle duration and uses the predicted value for idle state selection.”h]”(hŒThe ”…”�”}”(hjÀ h²hh³Nh´Nubjd)�”}”(hŒ``menu``”h]”hŒmenu”…”�”}”(hjÈ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÀ ubhŒ governor is the default ”…”�”}”(hjÀ h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjÚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÀ ubhXQ governor for tickless systems. It is quite complex, but the basic principle of its design is straightforward. Namely, when invoked to select an idle state for a CPU (i.e. an idle state that the CPU will ask the processor hardware to enter), it attempts to predict the idle duration and uses the predicted value for idle state selection.”…”�”}”(hjÀ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M hj� h²hubjî)�”}”(hX´It first uses a simple pattern recognition algorithm to obtain a preliminary idle duration prediction. Namely, it saves the last 8 observed idle duration values and, when predicting the idle duration next time, it computes the average and variance of them. If the variance is small (smaller than 400 square milliseconds) or it is small relative to the average (the average is greater that 6 times the standard deviation), the average is regarded as the "typical interval" value. Otherwise, either the longest or the shortest (depending on which one is farther from the average) of the saved observed idle duration values is discarded and the computation is repeated for the remaining ones.”h]”hX¸It first uses a simple pattern recognition algorithm to obtain a preliminary idle duration prediction. Namely, it saves the last 8 observed idle duration values and, when predicting the idle duration next time, it computes the average and variance of them. If the variance is small (smaller than 400 square milliseconds) or it is small relative to the average (the average is greater that 6 times the standard deviation), the average is regarded as the “typical intervalâ€� value. Otherwise, either the longest or the shortest (depending on which one is farther from the average) of the saved observed idle duration values is discarded and the computation is repeated for the remaining ones.”…”�”}”(hjò h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mhj� h²hubjî)�”}”(hXGAgain, if the variance of them is small (in the above sense), the average is taken as the "typical interval" value and so on, until either the "typical interval" is determined or too many data points are disregarded. In the latter case, if the size of the set of data points still under consideration is sufficiently large, the next idle duration is not likely to be above the largest idle duration value still in that set, so that value is taken as the predicted next idle duration. Finally, if the set of data points still under consideration is too small, no prediction is made.”h]”hXOAgain, if the variance of them is small (in the above sense), the average is taken as the “typical intervalâ€� value and so on, until either the “typical intervalâ€� is determined or too many data points are disregarded. In the latter case, if the size of the set of data points still under consideration is sufficiently large, the next idle duration is not likely to be above the largest idle duration value still in that set, so that value is taken as the predicted next idle duration. Finally, if the set of data points still under consideration is too small, no prediction is made.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mhj� h²hubjî)�”}”(hXÀIf the preliminary prediction of the next idle duration computed this way is long enough, the governor obtains the time until the closest timer event with the assumption that the scheduler tick will be stopped. That time, referred to as the *sleep length* in what follows, is the upper bound on the time before the next CPU wakeup. It is used to determine the sleep length range, which in turn is needed to get the sleep length correction factor.”h]”(hŒòIf the preliminary prediction of the next idle duration computed this way is long enough, the governor obtains the time until the closest timer event with the assumption that the scheduler tick will be stopped. That time, referred to as the ”…”�”}”(hj h²hh³Nh´Nubjr)�”}”(hŒ*sleep length*”h]”hŒ sleep length”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhj ubhŒÀ in what follows, is the upper bound on the time before the next CPU wakeup. It is used to determine the sleep length range, which in turn is needed to get the sleep length correction factor.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M#hj� h²hubjî)�”}”(hŒòThe ``menu`` governor maintains an array containing several correction factor values that correspond to different sleep length ranges organized so that each range represented in the array is approximately 10 times wider than the previous one.”h]”(hŒThe ”…”�”}”(hj. h²hh³Nh´Nubjd)�”}”(hŒ``menu``”h]”hŒmenu”…”�”}”(hj6 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj. ubhŒæ governor maintains an array containing several correction factor values that correspond to different sleep length ranges organized so that each range represented in the array is approximately 10 times wider than the previous one.”…”�”}”(hj. h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M*hj� h²hubjî)�”}”(hXSThe correction factor for the given sleep length range (determined before selecting the idle state for the CPU) is updated after the CPU has been woken up and the closer the sleep length is to the observed idle duration, the closer to 1 the correction factor becomes (it must fall between 0 and 1 inclusive). The sleep length is multiplied by the correction factor for the range that it falls into to obtain an approximation of the predicted idle duration that is compared to the "typical interval" determined previously and the minimum of the two is taken as the final idle duration prediction.”h]”hXWThe correction factor for the given sleep length range (determined before selecting the idle state for the CPU) is updated after the CPU has been woken up and the closer the sleep length is to the observed idle duration, the closer to 1 the correction factor becomes (it must fall between 0 and 1 inclusive). The sleep length is multiplied by the correction factor for the range that it falls into to obtain an approximation of the predicted idle duration that is compared to the “typical intervalâ€� determined previously and the minimum of the two is taken as the final idle duration prediction.”…”�”}”(hjN h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M/hj� h²hubjî)�”}”(hŒõIf the "typical interval" value is small, which means that the CPU is likely to be woken up soon enough, the sleep length computation is skipped as it may be costly and the idle duration is simply predicted to equal the "typical interval" value.”h]”hŒýIf the “typical intervalâ€� value is small, which means that the CPU is likely to be woken up soon enough, the sleep length computation is skipped as it may be costly and the idle duration is simply predicted to equal the “typical intervalâ€� value.”…”�”}”(hj\ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M8hj� h²hubjî)�”}”(hXéNow, the governor is ready to walk the list of idle states and choose one of them. For this purpose, it compares the target residency of each state with the predicted idle duration and the exit latency of it with the with the latency limit coming from the power management quality of service, or `PM QoS `_, framework. It selects the state with the target residency closest to the predicted idle duration, but still below it, and exit latency that does not exceed the limit.”•h]”(hX)Now, the governor is ready to walk the list of idle states and choose one of them. For this purpose, it compares the target residency of each state with the predicted idle duration and the exit latency of it with the with the latency limit coming from the power management quality of service, or ”…”�”}”(hjj h²hh³Nh´Nubj+)�”}”(hŒ`PM QoS `_”h]”hŒPM QoS”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒPM QoS”j¹Œ cpu-pm-qos”uh1j*hjj j Kubj®)�”}”(hŒ ”h]”h}”(h]”h ]”h"]”Œpm qos”ah$]”h&]”j¹j‚ uh1j­j Œ cpu-pm-qos”hjj j KubhŒ©, framework. It selects the state with the target residency closest to the predicted idle duration, but still below it, and exit latency that does not exceed the limit.”…”�”}”(hjj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M=hj� h²hubjî)�”}”(hX7In the final step the governor may still need to refine the idle state selection if it has not decided to `stop the scheduler tick `_. That happens if the idle duration predicted by it is less than the tick period and the tick has not been stopped already (in a previous iteration of the idle loop). Then, the sleep length used in the previous computations may not reflect the real time until the closest timer event and if it really is greater than that time, the governor may need to select a shallower state with a suitable target residency.”h]”(hŒjIn the final step the governor may still need to refine the idle state selection if it has not decided to ”…”�”}”(hj™ h²hh³Nh´Nubj+)�”}”(hŒ0`stop the scheduler tick `_”h]”hŒstop the scheduler tick”…”�”}”(hj¡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œstop the scheduler tick”j¹jL uh1j*hj™ j Kubj®)�”}”(hŒ ”h]”h}”(h]”h ]”h"]”Œstop the scheduler tick”ah$]”h&]”j¹jL uh1j­j Œidle-cpus-and-tick”hj™ j KubhX�. That happens if the idle duration predicted by it is less than the tick period and the tick has not been stopped already (in a previous iteration of the idle loop). Then, the sleep length used in the previous computations may not reflect the real time until the closest timer event and if it really is greater than that time, the governor may need to select a shallower state with a suitable target residency.”…”�”}”(hj™ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MEhj� h²hubj®)�”}”(hŒ .. _teo-gov:”h]”h}”(h]”h ]”h"]”h$]”h&]”j¹j uh1j­h´M¥hj� h²hh³hÇj»Kubeh}”(h]”(Œthe-menu-governor”j‘ eh ]”h"]”(Œthe menu governor”Œmenu-gov”eh$]”h&]”uh1j¸hjºh²hh³hÇh´Mj¤ }”j× j‡ sj¦ }”j‘ j‡ sj»Kubj¹)�”}”(hhh]”(j¾)�”}”(hŒ(The Timer Events Oriented (TEO) Governor”h]”hŒ(The Timer Events Oriented (TEO) Governor”…”�”}”(hjß h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hjÜ h²hh³hÇh´MRubjî)�”}”(hX:The timer events oriented (TEO) governor is an alternative ``CPUIdle`` governor for tickless systems. It follows the same basic strategy as the ``menu`` `one `_: it always tries to find the deepest idle state suitable for the given conditions. However, it applies a different approach to that problem.”h]”(hŒ;The timer events oriented (TEO) governor is an alternative ”…”�”}”(hjí h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjõ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjí ubhŒK governor for tickless systems. It follows the same basic strategy as the ”…”�”}”(hjí h²hh³Nh´Nubjd)�”}”(hŒ``menu``”h]”hŒmenu”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjí ubhŒ ”…”�”}”(hjí h²hh³Nh´Nubj+)�”}”(hŒ`one `_”h]”hŒone”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œone”j¹j‘ uh1j*hjí j Kubj®)�”}”(hŒ ”h]”h}”(h]”h ]”h"]”Œone”ah$]”h&]”j¹j‘ uh1j­j Œmenu-gov”hjí j KubhŒŽ: it always tries to find the deepest idle state suitable for the given conditions. However, it applies a different approach to that problem.”…”�”}”(hjí h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MThjÜ h²hubjî)�”}”(hXàThe idea of this governor is based on the observation that on many systems timer interrupts are two or more orders of magnitude more frequent than any other interrupt types, so they are likely to dominate CPU wakeup patterns. Moreover, in principle, the time when the next timer event is going to occur can be determined at the idle state selection time, although doing that may be costly, so it can be regarded as the most reliable source of information for idle state selection.”h]”hXàThe idea of this governor is based on the observation that on many systems timer interrupts are two or more orders of magnitude more frequent than any other interrupt types, so they are likely to dominate CPU wakeup patterns. Moreover, in principle, the time when the next timer event is going to occur can be determined at the idle state selection time, although doing that may be costly, so it can be regarded as the most reliable source of information for idle state selection.”…”�”}”(hj? h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³Œg/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle:431: ./drivers/cpuidle/governors/teo.c”h´K hjÜ h²hubjî)�”}”(hXSOf course, non-timer wakeup sources are more important in some use cases, but even then it is generally unnecessary to consider idle duration values greater than the time till the next timer event, referred as the sleep length in what follows, because the closest timer will ultimately wake up the CPU anyway unless it is woken up earlier.”h]”hXSOf course, non-timer wakeup sources are more important in some use cases, but even then it is generally unnecessary to consider idle duration values greater than the time till the next timer event, referred as the sleep length in what follows, because the closest timer will ultimately wake up the CPU anyway unless it is woken up earlier.”…”�”}”(hjN h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³Œg/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle:431: ./drivers/cpuidle/governors/teo.c”h´KhjÜ h²hubjî)�”}”(hX3However, since obtaining the sleep length may be costly, the governor first checks if it can select a shallow idle state using wakeup pattern information from recent times, in which case it can do without knowing the sleep length at all. For this purpose, it counts CPU wakeup events and looks for an idle state whose target residency has not exceeded the idle duration (measured after wakeup) in the majority of relevant recent cases. If the target residency of that state is small enough, it may be used right away and the sleep length need not be determined.”h]”hX3However, since obtaining the sleep length may be costly, the governor first checks if it can select a shallow idle state using wakeup pattern information from recent times, in which case it can do without knowing the sleep length at all. For this purpose, it counts CPU wakeup events and looks for an idle state whose target residency has not exceeded the idle duration (measured after wakeup) in the majority of relevant recent cases. If the target residency of that state is small enough, it may be used right away and the sleep length need not be determined.”…”�”}”(hj] h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³Œg/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle:431: ./drivers/cpuidle/governors/teo.c”h´KhjÜ h²hubjî)�”}”(hXÎThe computations carried out by this governor are based on using bins whose boundaries are aligned with the target residency parameter values of the CPU idle states provided by the ``CPUIdle`` driver in the ascending order. That is, the first bin spans from 0 up to, but not including, the target residency of the second idle state (idle state 1), the second bin spans from the target residency of idle state 1 up to, but not including, the target residency of idle state 2, the third bin spans from the target residency of idle state 2 up to, but not including, the target residency of idle state 3 and so on. The last bin spans from the target residency of the deepest idle state supplied by the driver to infinity.”h]”(hŒµThe computations carried out by this governor are based on using bins whose boundaries are aligned with the target residency parameter values of the CPU idle states provided by the ”…”�”}”(hjl h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjt h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjl ubhX driver in the ascending order. That is, the first bin spans from 0 up to, but not including, the target residency of the second idle state (idle state 1), the second bin spans from the target residency of idle state 1 up to, but not including, the target residency of idle state 2, the third bin spans from the target residency of idle state 2 up to, but not including, the target residency of idle state 3 and so on. The last bin spans from the target residency of the deepest idle state supplied by the driver to infinity.”…”�”}”(hjl h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³Œg/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle:431: ./drivers/cpuidle/governors/teo.c”h´K!hjÜ h²hubjî)�”}”(hŒÁTwo metrics called "hits" and "intercepts" are associated with each bin. They are updated every time before selecting an idle state for the given CPU in accordance with what happened last time.”h]”hŒÉTwo metrics called “hitsâ€� and “interceptsâ€� are associated with each bin. They are updated every time before selecting an idle state for the given CPU in accordance with what happened last time.”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³Œg/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle:431: ./drivers/cpuidle/governors/teo.c”h´K,hjÜ h²hubjî)�”}”(hXÕThe "hits" metric reflects the relative frequency of situations in which the sleep length and the idle duration measured after CPU wakeup are close enough (that is, the CPU appears to wake up "on time" relative to the sleep length). In turn, the "intercepts" metric reflects the relative frequency of non-timer wakeup events for which the measured idle duration is significantly different from the sleep length (these events are also referred to as "intercepts" below).”h]”hXåThe “hitsâ€� metric reflects the relative frequency of situations in which the sleep length and the idle duration measured after CPU wakeup are close enough (that is, the CPU appears to wake up “on timeâ€� relative to the sleep length). In turn, the “interceptsâ€� metric reflects the relative frequency of non-timer wakeup events for which the measured idle duration is significantly different from the sleep length (these events are also referred to as “interceptsâ€� below).”…”�”}”(hjœ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³Œg/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle:431: ./drivers/cpuidle/governors/teo.c”h´K0hjÜ h²hubjî)�”}”(hŒµThe governor also counts "intercepts" with the measured idle duration below the tick period length and uses this information when deciding whether or not to stop the scheduler tick.”h]”hŒ¹The governor also counts “interceptsâ€� with the measured idle duration below the tick period length and uses this information when deciding whether or not to stop the scheduler tick.”…”�”}”(hj« h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³Œg/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle:431: ./drivers/cpuidle/governors/teo.c”h´K8hjÜ h²hubjî)�”}”(hŒ In order to select an idle state for a CPU, the governor takes the following steps (modulo the possible latency constraint that must be taken into account too):”h]”hŒ In order to select an idle state for a CPU, the governor takes the following steps (modulo the possible latency constraint that must be taken into account too):”…”�”}”(hjº h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³Œg/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/cpuidle:431: ./drivers/cpuidle/governors/teo.c”h´K`_, must reflect the properties of the idle state at the deepest level (i.e. the idle state of the unit containing all of the other units).”h]”(hŒšFor the CPU idle time management purposes all of the physical idle states supported by the processor have to be represented as a one-dimensional array of ”…”�”}”(hjh²hh³Nh´Nubh)�”}”(hjah]”jd)�”}”(hjah]”hŒstruct cpuidle_state”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jojpjqeh"]”h$]”h&]”uh1jch³Nh´Nhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j|Œ refdomain”jpŒreftype”jŒ refexplicit”ˆŒrefwarn”‰Œ reftarget”jƒuh1hh³hÇh´Khjh²hubhŒ· objects each allowing an individual (logical) CPU to ask the processor hardware to enter an idle state of certain properties. If there is a hierarchy of units in the processor, one ”…”�”}”(hjh²hh³Nh´Nubh)�”}”(hjah]”jd)�”}”(hjah]”hŒstruct cpuidle_state”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”(jojpjqeh"]”h$]”h&]”uh1jch³Nh´Nhj0ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j|Œ refdomain”jpŒreftype”jŒ refexplicit”ˆŒrefwarn”‰Œ reftarget”jƒuh1hh³hÇh´Khjh²hubhŒ object can cover a combination of idle states supported by the units at different levels of the hierarchy. In that case, the ”…”�”}”(hjh²hh³Nh´Nubj+)�”}”(hŒB`target residency and exit latency parameters of it `_”h]”hŒ2target residency and exit latency parameters of it”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ2target residency and exit latency parameters of it”j¹jºuh1j*hjj Kubj®)�”}”(hŒ ”h]”h}”(h]”h ]”h"]”Œ2target residency and exit latency parameters of it”ah$]”h&]”j¹jºuh1j­j Œ idle-loop”hjj KubhŒ‰, must reflect the properties of the idle state at the deepest level (i.e. the idle state of the unit containing all of the other units).”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mahj÷h²hubjî)�”}”(hXNFor example, take a processor with two cores in a larger unit referred to as a "module" and suppose that asking the hardware to enter a specific idle state (say "X") at the "core" level by one core will trigger the module to try to enter a specific idle state of its own (say "MX") if the other core is in idle state "X" already. In other words, asking for idle state "X" at the "core" level gives the hardware a license to go as deep as to idle state "MX" at the "module" level, but there is no guarantee that this is going to happen (the core asking for idle state "X" may just end up in that state by itself instead). Then, the target residency of the |struct cpuidle_state| object representing idle state "X" must reflect the minimum time to spend in idle state "MX" of the module (including the time needed to enter it), because that is the minimum time the CPU needs to be idle to save any energy in case the hardware enters that state. Analogously, the exit latency parameter of that object must cover the exit time of idle state "MX" of the module (and usually its entry time too), because that is the maximum delay between a wakeup signal and the time the CPU will start to execute the first new instruction (assuming that both cores in the module will always be ready to execute instructions as soon as the module becomes operational as a whole).”h]”(hX¸For example, take a processor with two cores in a larger unit referred to as a “moduleâ€� and suppose that asking the hardware to enter a specific idle state (say “Xâ€�) at the “coreâ€� level by one core will trigger the module to try to enter a specific idle state of its own (say “MXâ€�) if the other core is in idle state “Xâ€� already. In other words, asking for idle state “Xâ€� at the “coreâ€� level gives the hardware a license to go as deep as to idle state “MXâ€� at the “moduleâ€� level, but there is no guarantee that this is going to happen (the core asking for idle state “Xâ€� may just end up in that state by itself instead). Then, the target residency of the ”…”�”}”(hjvh²hh³Nh´Nubh)�”}”(hjah]”jd)�”}”(hjah]”hŒstruct cpuidle_state”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”(jojpjqeh"]”h$]”h&]”uh1jch³Nh´Nhj~ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j|Œ refdomain”jpŒreftype”jŒ refexplicit”ˆŒrefwarn”‰Œ reftarget”jƒuh1hh³hÇh´Khjvh²hubhX´ object representing idle state “Xâ€� must reflect the minimum time to spend in idle state “MXâ€� of the module (including the time needed to enter it), because that is the minimum time the CPU needs to be idle to save any energy in case the hardware enters that state. Analogously, the exit latency parameter of that object must cover the exit time of idle state “MXâ€� of the module (and usually its entry time too), because that is the maximum delay between a wakeup signal and the time the CPU will start to execute the first new instruction (assuming that both cores in the module will always be ready to execute instructions as soon as the module becomes operational as a whole).”…”�”}”(hjvh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mlhj÷h²hubjî)�”}”(hXíThere are processors without direct coordination between different levels of the hierarchy of units inside them, however. In those cases asking for an idle state at the "core" level does not automatically affect the "module" level, for example, in any way and the ``CPUIdle`` driver is responsible for the entire handling of the hierarchy. Then, the definition of the idle state objects is entirely up to the driver, but still the physical properties of the idle state that the processor hardware finally goes into must always follow the parameters used by the governor for idle state selection (for instance, the actual exit latency of that idle state must not exceed the exit latency parameter of the idle state object selected by the governor).”h]”(hXThere are processors without direct coordination between different levels of the hierarchy of units inside them, however. In those cases asking for an idle state at the “coreâ€� level does not automatically affect the “moduleâ€� level, for example, in any way and the ”…”�”}”(hj¤h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj¤ubhXÙ driver is responsible for the entire handling of the hierarchy. Then, the definition of the idle state objects is entirely up to the driver, but still the physical properties of the idle state that the processor hardware finally goes into must always follow the parameters used by the governor for idle state selection (for instance, the actual exit latency of that idle state must not exceed the exit latency parameter of the idle state object selected by the governor).”…”�”}”(hj¤h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mhj÷h²hubjî)�”}”(hX In addition to the target residency and exit latency idle state parameters discussed above, the objects representing idle states each contain a few other parameters describing the idle state and a pointer to the function to run in order to ask the hardware to enter that state. Also, for each |struct cpuidle_state| object, there is a corresponding :c:type:`struct cpuidle_state_usage ` one containing usage statistics of the given idle state. That information is exposed by the kernel via ``sysfs``.”h]”(hX&In addition to the target residency and exit latency idle state parameters discussed above, the objects representing idle states each contain a few other parameters describing the idle state and a pointer to the function to run in order to ask the hardware to enter that state. Also, for each ”…”�”}”(hjÄh²hh³Nh´Nubh)�”}”(hjah]”jd)�”}”(hjah]”hŒstruct cpuidle_state”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”(jojpjqeh"]”h$]”h&]”uh1jch³Nh´NhjÌubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j|Œ refdomain”jpŒreftype”jŒ refexplicit”ˆŒrefwarn”‰Œ reftarget”jƒuh1hh³hÇh´KhjÄh²hubhŒ" object, there is a corresponding ”…”�”}”(hjÄh²hh³Nh´Nubh)�”}”(hŒ::c:type:`struct cpuidle_state_usage `”h]”jd)�”}”(hjîh]”hŒstruct cpuidle_state_usage”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”(jojpŒc-type”eh"]”h$]”h&]”uh1jchjìubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j|Œ refdomain”jpŒreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰j‚Œcpuidle_state_usage”uh1hh³hÇh´MŠhjÄubhŒi one containing usage statistics of the given idle state. That information is exposed by the kernel via ”…”�”}”(hjÄh²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÄubhŒ.”…”�”}”(hjÄh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MŠhj÷h²hubjî)�”}”(hXšFor each CPU in the system, there is a :file:`/sys/devices/system/cpu/cpu/cpuidle/` directory in ``sysfs``, where the number ```` is assigned to the given CPU at the initialization time. That directory contains a set of subdirectories called :file:`state0`, :file:`state1` and so on, up to the number of idle state objects defined for the given CPU minus one. Each of these directories corresponds to one idle state object and the larger the number in its name, the deeper the (effective) idle state represented by it. Each of them contains a number of files (attributes) representing the properties of the idle state object corresponding to it, as follows:”h]”(hŒ'For each CPU in the system, there is a ”…”�”}”(hj'h²hh³Nh´Nubjd)�”}”(hŒ/:file:`/sys/devices/system/cpu/cpu/cpuidle/`”h]”hŒ'/sys/devices/system/cpu/cpu/cpuidle/”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchj'ubhŒ directory in ”…”�”}”(hj'h²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj'ubhŒ, where the number ”…”�”}”(hj'h²hh³Nh´Nubjd)�”}”(hŒ````”h]”hŒ”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj'ubhŒr is assigned to the given CPU at the initialization time. That directory contains a set of subdirectories called ”…”�”}”(hj'h²hh³Nh´Nubjd)�”}”(hŒ:file:`state0`”h]”hŒstate0”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchj'ubhŒ, ”…”�”}”(hj'h²hh³Nh´Nubjd)�”}”(hŒ:file:`state1`”h]”hŒstate1”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchj'ubhXƒ and so on, up to the number of idle state objects defined for the given CPU minus one. Each of these directories corresponds to one idle state object and the larger the number in its name, the deeper the (effective) idle state represented by it. Each of them contains a number of files (attributes) representing the properties of the idle state object corresponding to it, as follows:”…”�”}”(hj'h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M“hj÷h²hubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒš``above`` Total number of times this idle state had been asked for, but the observed idle duration was certainly too short to match its target residency. ”h]”(hŒterm”“”)�”}”(hŒ ``above``”h]”jd)�”}”(hj§h]”hŒabove”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj¥ubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M hjŸubhŒ definition”“”)�”}”(hhh]”jî)�”}”(hŒ�Total number of times this idle state had been asked for, but the observed idle duration was certainly too short to match its target residency.”h]”hŒ�Total number of times this idle state had been asked for, but the observed idle duration was certainly too short to match its target residency.”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mžhj¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjŸubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M hjšubjž)�”}”(hŒ¥``below`` Total number of times this idle state had been asked for, but certainly a deeper idle state would have been a better match for the observed idle duration. ”h]”(j¤)�”}”(hŒ ``below``”h]”jd)�”}”(hjáh]”hŒbelow”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjßubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M¥hjÛubj½)�”}”(hhh]”jî)�”}”(hŒšTotal number of times this idle state had been asked for, but certainly a deeper idle state would have been a better match for the observed idle duration.”h]”hŒšTotal number of times this idle state had been asked for, but certainly a deeper idle state would have been a better match for the observed idle duration.”…”�”}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M£hjöubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjÛubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M¥hjšh²hubjž)�”}”(hŒ(``desc`` Description of the idle state. ”h]”(j¤)�”}”(hŒ``desc``”h]”jd)�”}”(hjh]”hŒdesc”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M¨hjubj½)�”}”(hhh]”jî)�”}”(hŒDescription of the idle state.”h]”hŒDescription of the idle state.”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M¨hj.ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M¨hjšh²hubjž)�”}”(hŒ8``disable`` Whether or not this idle state is disabled. ”h]”(j¤)�”}”(hŒ ``disable``”h]”jd)�”}”(hjQh]”hŒdisable”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjOubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M«hjKubj½)�”}”(hhh]”jî)�”}”(hŒ+Whether or not this idle state is disabled.”h]”hŒ+Whether or not this idle state is disabled.”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M«hjfubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjKubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M«hjšh²hubjž)�”}”(hŒN``default_status`` The default status of this state, "enabled" or "disabled". ”h]”(j¤)�”}”(hŒ``default_status``”h]”jd)�”}”(hj‰h]”hŒdefault_status”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj‡ubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M®hjƒubj½)�”}”(hhh]”jî)�”}”(hŒ:The default status of this state, "enabled" or "disabled".”h]”hŒBThe default status of this state, “enabledâ€� or “disabledâ€�.”…”�”}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M®hjžubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjƒubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M®hjšh²hubjž)�”}”(hŒ<``latency`` Exit latency of the idle state in microseconds. ”h]”(j¤)�”}”(hŒ ``latency``”h]”jd)�”}”(hjÁh]”hŒlatency”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj¿ubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M±hj»ubj½)�”}”(hhh]”jî)�”}”(hŒ/Exit latency of the idle state in microseconds.”h]”hŒ/Exit latency of the idle state in microseconds.”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M±hjÖubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hj»ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M±hjšh²hubjž)�”}”(hŒ!``name`` Name of the idle state. ”h]”(j¤)�”}”(hŒ``name``”h]”jd)�”}”(hjùh]”hŒname”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj÷ubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M´hjóubj½)�”}”(hhh]”jî)�”}”(hŒName of the idle state.”h]”hŒName of the idle state.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M´hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjóubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M´hjšh²hubjž)�”}”(hŒ```power`` Power drawn by hardware in this idle state in milliwatts (if specified, 0 otherwise). ”h]”(j¤)�”}”(hŒ ``power``”h]”jd)�”}”(hj1h]”hŒpower”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj/ubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M¸hj+ubj½)�”}”(hhh]”jî)�”}”(hŒUPower drawn by hardware in this idle state in milliwatts (if specified, 0 otherwise).”h]”hŒUPower drawn by hardware in this idle state in milliwatts (if specified, 0 otherwise).”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M·hjFubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hj+ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M¸hjšh²hubjž)�”}”(hŒB``residency`` Target residency of the idle state in microseconds. ”h]”(j¤)�”}”(hŒ ``residency``”h]”jd)�”}”(hjih]”hŒ residency”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjgubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M»hjcubj½)�”}”(hhh]”jî)�”}”(hŒ3Target residency of the idle state in microseconds.”h]”hŒ3Target residency of the idle state in microseconds.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M»hj~ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjcubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M»hjšh²hubjž)�”}”(hŒk``time`` Total time spent in this idle state by the given CPU (as measured by the kernel) in microseconds. ”h]”(j¤)�”}”(hŒ``time``”h]”jd)�”}”(hj¡h]”hŒtime”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjŸubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´M¿hj›ubj½)�”}”(hhh]”jî)�”}”(hŒaTotal time spent in this idle state by the given CPU (as measured by the kernel) in microseconds.”h]”hŒaTotal time spent in this idle state by the given CPU (as measured by the kernel) in microseconds.”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M¾hj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hj›ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´M¿hjšh²hubjž)�”}”(hŒg``usage`` Total number of times the hardware has been asked by the given CPU to enter this idle state. ”h]”(j¤)�”}”(hŒ ``usage``”h]”jd)�”}”(hjÙh]”hŒusage”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj×ubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´MÃhjÓubj½)�”}”(hhh]”jî)�”}”(hŒ\Total number of times the hardware has been asked by the given CPU to enter this idle state.”h]”hŒ\Total number of times the hardware has been asked by the given CPU to enter this idle state.”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MÂhjîubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjÓubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´MÃhjšh²hubjž)�”}”(hŒe``rejected`` Total number of times a request to enter this idle state on the given CPU was rejected. ”h]”(j¤)�”}”(hŒ ``rejected``”h]”jd)�”}”(hjh]”hŒrejected”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³hÇh´MÇhj ubj½)�”}”(hhh]”jî)�”}”(hŒWTotal number of times a request to enter this idle state on the given CPU was rejected.”h]”hŒWTotal number of times a request to enter this idle state on the given CPU was rejected.”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MÆhj&ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´MÇhjšh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j˜hj÷h²hh³hÇh´Nubjî)�”}”(hXThe :file:`desc` and :file:`name` files both contain strings. The difference between them is that the name is expected to be more concise, while the description may be longer and it may contain white space or special characters. The other files listed above contain integer numbers.”h]”(hŒThe ”…”�”}”(hjIh²hh³Nh´Nubjd)�”}”(hŒ :file:`desc`”h]”hŒdesc”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjIubhŒ and ”…”�”}”(hjIh²hh³Nh´Nubjd)�”}”(hŒ :file:`name`”h]”hŒname”…”�”}”(hjfh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjIubhŒú files both contain strings. The difference between them is that the name is expected to be more concise, while the description may be longer and it may contain white space or special characters. The other files listed above contain integer numbers.”…”�”}”(hjIh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MÉhj÷h²hubjî)�”}”(hX¡The :file:`disable` attribute is the only writeable one. If it contains 1, the given idle state is disabled for this particular CPU, which means that the governor will never select it for this particular CPU and the ``CPUIdle`` driver will never ask the hardware to enter it for that CPU as a result. However, disabling an idle state for one CPU does not prevent it from being asked for by the other CPUs, so it must be disabled for all of them in order to never be asked for by any of them. [Note that, due to the way the ``ladder`` governor is implemented, disabling an idle state prevents that governor from selecting any idle states deeper than the disabled one too.]”h]”(hŒThe ”…”�”}”(hj�h²hh³Nh´Nubjd)�”}”(hŒ:file:`disable`”h]”hŒdisable”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchj�ubhŒÆ attribute is the only writeable one. If it contains 1, the given idle state is disabled for this particular CPU, which means that the governor will never select it for this particular CPU and the ”…”�”}”(hj�h²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj�ubhX) driver will never ask the hardware to enter it for that CPU as a result. However, disabling an idle state for one CPU does not prevent it from being asked for by the other CPUs, so it must be disabled for all of them in order to never be asked for by any of them. [Note that, due to the way the ”…”�”}”(hj�h²hh³Nh´Nubjd)�”}”(hŒ ``ladder``”h]”hŒladder”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj�ubhŒŠ governor is implemented, disabling an idle state prevents that governor from selecting any idle states deeper than the disabled one too.]”…”�”}”(hj�h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MÎhj÷h²hubjî)�”}”(hXèIf the :file:`disable` attribute contains 0, the given idle state is enabled for this particular CPU, but it still may be disabled for some or all of the other CPUs in the system at the same time. Writing 1 to it causes the idle state to be disabled for this particular CPU and writing 0 to it allows the governor to take it into consideration for the given CPU and the driver to ask for it, unless that state was disabled globally in the driver (in which case it cannot be used at all).”h]”(hŒIf the ”…”�”}”(hjÈh²hh³Nh´Nubjd)�”}”(hŒ:file:`disable`”h]”hŒdisable”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÈubhXÒ attribute contains 0, the given idle state is enabled for this particular CPU, but it still may be disabled for some or all of the other CPUs in the system at the same time. Writing 1 to it causes the idle state to be disabled for this particular CPU and writing 0 to it allows the governor to take it into consideration for the given CPU and the driver to ask for it, unless that state was disabled globally in the driver (in which case it cannot be used at all).”…”�”}”(hjÈh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MØhj÷h²hubjî)�”}”(hXÆThe :file:`power` attribute is not defined very well, especially for idle state objects representing combinations of idle states at different levels of the hierarchy of units in the processor, and it generally is hard to obtain idle state power numbers for complex hardware, so :file:`power` often contains 0 (not available) and if it contains a nonzero number, that number may not be very accurate and it should not be relied on for anything meaningful.”h]”(hŒThe ”…”�”}”(hjëh²hh³Nh´Nubjd)�”}”(hŒ :file:`power`”h]”hŒpower”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjëubhX attribute is not defined very well, especially for idle state objects representing combinations of idle states at different levels of the hierarchy of units in the processor, and it generally is hard to obtain idle state power numbers for complex hardware, so ”…”�”}”(hjëh²hh³Nh´Nubjd)�”}”(hŒ :file:`power`”h]”hŒpower”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjëubhŒ£ often contains 0 (not available) and if it contains a nonzero number, that number may not be very accurate and it should not be relied on for anything meaningful.”…”�”}”(hjëh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Màhj÷h²hubjî)�”}”(hXøThe number in the :file:`time` file generally may be greater than the total time really spent by the given CPU in the given idle state, because it is measured by the kernel and it may not cover the cases in which the hardware refused to enter this idle state and entered a shallower one instead of it (or even it did not enter any idle state at all). The kernel can only measure the time span between asking the hardware to enter an idle state and the subsequent wakeup of the CPU and it cannot say what really happened in the meantime at the hardware level. Moreover, if the idle state object in question represents a combination of idle states at different levels of the hierarchy of units in the processor, the kernel can never say how deep the hardware went down the hierarchy in any particular case. For these reasons, the only reliable way to find out how much time has been spent by the hardware in different idle states supported by it is to use idle state residency counters in the hardware, if available.”h]”(hŒThe number in the ”…”�”}”(hj#h²hh³Nh´Nubjd)�”}”(hŒ :file:`time`”h]”hŒtime”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchj#ubhXÚ file generally may be greater than the total time really spent by the given CPU in the given idle state, because it is measured by the kernel and it may not cover the cases in which the hardware refused to enter this idle state and entered a shallower one instead of it (or even it did not enter any idle state at all). The kernel can only measure the time span between asking the hardware to enter an idle state and the subsequent wakeup of the CPU and it cannot say what really happened in the meantime at the hardware level. Moreover, if the idle state object in question represents a combination of idle states at different levels of the hierarchy of units in the processor, the kernel can never say how deep the hardware went down the hierarchy in any particular case. For these reasons, the only reliable way to find out how much time has been spent by the hardware in different idle states supported by it is to use idle state residency counters in the hardware, if available.”…”�”}”(hj#h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mçhj÷h²hubjî)�”}”(hXjGenerally, an interrupt received when trying to enter an idle state causes the idle state entry request to be rejected, in which case the ``CPUIdle`` driver may return an error code to indicate that this was the case. The :file:`usage` and :file:`rejected` files report the number of times the given idle state was entered successfully or rejected, respectively.”h]”(hŒŠGenerally, an interrupt received when trying to enter an idle state causes the idle state entry request to be rejected, in which case the ”…”�”}”(hjFh²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjFubhŒI driver may return an error code to indicate that this was the case. The ”…”�”}”(hjFh²hh³Nh´Nubjd)�”}”(hŒ :file:`usage`”h]”hŒusage”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjFubhŒ and ”…”�”}”(hjFh²hh³Nh´Nubjd)�”}”(hŒ:file:`rejected`”h]”hŒrejected”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjFubhŒj files report the number of times the given idle state was entered successfully or rejected, respectively.”…”�”}”(hjFh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mõhj÷h²hubj®)�”}”(hŒ.. _cpu-pm-qos:”h]”h}”(h]”h ]”h"]”h$]”h&]”j¹j‚ uh1j­h´MQhj÷h²hh³hÇj»Kubeh}”(h]”(Œrepresentation-of-idle-states”jëeh ]”h"]”(Œrepresentation of idle states”Œidle-states-representation”eh$]”h&]”uh1j¸hjºh²hh³hÇh´M_j¤ }”j jásj¦ }”jëjásj»Kubj¹)�”}”(hhh]”(j¾)�”}”(hŒ,Power Management Quality of Service for CPUs”h]”hŒ,Power Management Quality of Service for CPUs”…”�”}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hj¥h²hh³hÇh´Mþubjî)�”}”(hŒþThe power management quality of service (PM QoS) framework in the Linux kernel allows kernel code and user space processes to set constraints on various energy-efficiency features of the kernel to prevent performance from dropping below a required level.”h]”hŒþThe power management quality of service (PM QoS) framework in the Linux kernel allows kernel code and user space processes to set constraints on various energy-efficiency features of the kernel to prevent performance from dropping below a required level.”…”�”}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mhj¥h²hubjî)�”}”(hXÚCPU idle time management can be affected by PM QoS in two ways, through the global CPU latency limit and through the resume latency constraints for individual CPUs. Kernel code (e.g. device drivers) can set both of them with the help of special internal interfaces provided by the PM QoS framework. User space can modify the former by opening the :file:`cpu_dma_latency` special device file under :file:`/dev/` and writing a binary value (interpreted as a signed 32-bit integer) to it. In turn, the resume latency constraint for a CPU can be modified from user space by writing a string (representing a signed 32-bit integer) to the :file:`power/pm_qos_resume_latency_us` file under :file:`/sys/devices/system/cpu/cpu/` in ``sysfs``, where the CPU number ```` is allocated at the system initialization time. Negative values will be rejected in both cases and, also in both cases, the written integer number will be interpreted as a requested PM QoS constraint in microseconds.”h]”(hX]CPU idle time management can be affected by PM QoS in two ways, through the global CPU latency limit and through the resume latency constraints for individual CPUs. Kernel code (e.g. device drivers) can set both of them with the help of special internal interfaces provided by the PM QoS framework. User space can modify the former by opening the ”…”�”}”(hjÄh²hh³Nh´Nubjd)�”}”(hŒ:file:`cpu_dma_latency`”h]”hŒcpu_dma_latency”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÄubhŒ special device file under ”…”�”}”(hjÄh²hh³Nh´Nubjd)�”}”(hŒ :file:`/dev/`”h]”hŒ/dev/”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÄubhŒà and writing a binary value (interpreted as a signed 32-bit integer) to it. In turn, the resume latency constraint for a CPU can be modified from user space by writing a string (representing a signed 32-bit integer) to the ”…”�”}”(hjÄh²hh³Nh´Nubjd)�”}”(hŒ&:file:`power/pm_qos_resume_latency_us`”h]”hŒpower/pm_qos_resume_latency_us”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÄubhŒ file under ”…”�”}”(hjÄh²hh³Nh´Nubjd)�”}”(hŒ':file:`/sys/devices/system/cpu/cpu/`”h]”hŒ/sys/devices/system/cpu/cpu/”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÄubhŒ in ”…”�”}”(hjÄh²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÄubhŒ, where the CPU number ”…”�”}”(hjÄh²hh³Nh´Nubjd)�”}”(hŒ````”h]”hŒ”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÄubhŒÚ is allocated at the system initialization time. Negative values will be rejected in both cases and, also in both cases, the written integer number will be interpreted as a requested PM QoS constraint in microseconds.”…”�”}”(hjÄh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mhj¥h²hubjî)�”}”(hXÒThe requested value is not automatically applied as a new constraint, however, as it may be less restrictive (greater in this particular case) than another constraint previously requested by someone else. For this reason, the PM QoS framework maintains a list of requests that have been made so far for the global CPU latency limit and for each individual CPU, aggregates them and applies the effective (minimum in this particular case) value as the new constraint.”h]”hXÒThe requested value is not automatically applied as a new constraint, however, as it may be less restrictive (greater in this particular case) than another constraint previously requested by someone else. For this reason, the PM QoS framework maintains a list of requests that have been made so far for the global CPU latency limit and for each individual CPU, aggregates them and applies the effective (minimum in this particular case) value as the new constraint.”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mhj¥h²hubjî)�”}”(hXIn fact, opening the :file:`cpu_dma_latency` special device file causes a new PM QoS request to be created and added to a global priority list of CPU latency limit requests and the file descriptor coming from the "open" operation represents that request. If that file descriptor is then used for writing, the number written to it will be associated with the PM QoS request represented by it as a new requested limit value. Next, the priority list mechanism will be used to determine the new effective value of the entire list of requests and that effective value will be set as a new CPU latency limit. Thus requesting a new limit value will only change the real limit if the effective "list" value is affected by it, which is the case if it is the minimum of the requested values in the list.”h]”(hŒIn fact, opening the ”…”�”}”(hjXh²hh³Nh´Nubjd)�”}”(hŒ:file:`cpu_dma_latency`”h]”hŒcpu_dma_latency”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjXubhXø special device file causes a new PM QoS request to be created and added to a global priority list of CPU latency limit requests and the file descriptor coming from the “openâ€� operation represents that request. If that file descriptor is then used for writing, the number written to it will be associated with the PM QoS request represented by it as a new requested limit value. Next, the priority list mechanism will be used to determine the new effective value of the entire list of requests and that effective value will be set as a new CPU latency limit. Thus requesting a new limit value will only change the real limit if the effective “listâ€� value is affected by it, which is the case if it is the minimum of the requested values in the list.”…”�”}”(hjXh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mhj¥h²hubjî)�”}”(hŒàThe process holding a file descriptor obtained by opening the :file:`cpu_dma_latency` special device file controls the PM QoS request associated with that file descriptor, but it controls this particular PM QoS request only.”h]”(hŒ>The process holding a file descriptor obtained by opening the ”…”�”}”(hj{h²hh³Nh´Nubjd)�”}”(hŒ:file:`cpu_dma_latency`”h]”hŒcpu_dma_latency”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchj{ubhŒ‹ special device file controls the PM QoS request associated with that file descriptor, but it controls this particular PM QoS request only.”…”�”}”(hj{h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M'hj¥h²hubjî)�”}”(hX¶Closing the :file:`cpu_dma_latency` special device file or, more precisely, the file descriptor obtained while opening it, causes the PM QoS request associated with that file descriptor to be removed from the global priority list of CPU latency limit requests and destroyed. If that happens, the priority list mechanism will be used again, to determine the new effective value for the whole list and that value will become the new limit.”h]”(hŒ Closing the ”…”�”}”(hjžh²hh³Nh´Nubjd)�”}”(hŒ:file:`cpu_dma_latency`”h]”hŒcpu_dma_latency”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjžubhX“ special device file or, more precisely, the file descriptor obtained while opening it, causes the PM QoS request associated with that file descriptor to be removed from the global priority list of CPU latency limit requests and destroyed. If that happens, the priority list mechanism will be used again, to determine the new effective value for the whole list and that value will become the new limit.”…”�”}”(hjžh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M,hj¥h²hubjî)�”}”(hXÇIn turn, for each CPU there is one resume latency PM QoS request associated with the :file:`power/pm_qos_resume_latency_us` file under :file:`/sys/devices/system/cpu/cpu/` in ``sysfs`` and writing to it causes this single PM QoS request to be updated regardless of which user space process does that. In other words, this PM QoS request is shared by the entire user space, so access to the file associated with it needs to be arbitrated to avoid confusion. [Arguably, the only legitimate use of this mechanism in practice is to pin a process to the CPU in question and let it use the ``sysfs`` interface to control the resume latency constraint for it.] It is still only a request, however. It is an entry in a priority list used to determine the effective value to be set as the resume latency constraint for the CPU in question every time the list of requests is updated this way or another (there may be other requests coming from kernel code in that list).”h]”(hŒUIn turn, for each CPU there is one resume latency PM QoS request associated with the ”…”�”}”(hjÁh²hh³Nh´Nubjd)�”}”(hŒ&:file:`power/pm_qos_resume_latency_us`”h]”hŒpower/pm_qos_resume_latency_us”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÁubhŒ file under ”…”�”}”(hjÁh²hh³Nh´Nubjd)�”}”(hŒ':file:`/sys/devices/system/cpu/cpu/`”h]”hŒ/sys/devices/system/cpu/cpu/”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”Œfile”ah"]”h$]”h&]”Œrole”Œfile”uh1jchjÁubhŒ in ”…”�”}”(hjÁh²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÁubhX’ and writing to it causes this single PM QoS request to be updated regardless of which user space process does that. In other words, this PM QoS request is shared by the entire user space, so access to the file associated with it needs to be arbitrated to avoid confusion. [Arguably, the only legitimate use of this mechanism in practice is to pin a process to the CPU in question and let it use the ”…”�”}”(hjÁh²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÁubhXq interface to control the resume latency constraint for it.] It is still only a request, however. It is an entry in a priority list used to determine the effective value to be set as the resume latency constraint for the CPU in question every time the list of requests is updated this way or another (there may be other requests coming from kernel code in that list).”…”�”}”(hjÁh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M3hj¥h²hubjî)�”}”(hX\CPU idle time governors are expected to regard the minimum of the global (effective) CPU latency limit and the effective resume latency constraint for the given CPU as the upper limit for the exit latency of the idle states that they are allowed to select for that CPU. They should never select any idle states with exit latency beyond that limit.”h]”hX\CPU idle time governors are expected to regard the minimum of the global (effective) CPU latency limit and the effective resume latency constraint for the given CPU as the upper limit for the exit latency of the idle states that they are allowed to select for that CPU. They should never select any idle states with exit latency beyond that limit.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MAhj¥h²hubjî)�”}”(hXoWhile the above CPU QoS constraints apply to CPU idle time management, user space may also request a CPU system wakeup latency QoS limit, via the `cpu_wakeup_latency` file. This QoS constraint is respected when selecting a suitable idle state for the CPUs, while entering the system-wide suspend-to-idle sleep state, but also to the regular CPU idle time management.”h]”(hŒ’While the above CPU QoS constraints apply to CPU idle time management, user space may also request a CPU system wakeup latency QoS limit, via the ”…”�”}”(hj+h²hh³Nh´NubhŒtitle_reference”“”)�”}”(hŒ`cpu_wakeup_latency`”h]”hŒcpu_wakeup_latency”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j3hj+ubhŒÉ file. This QoS constraint is respected when selecting a suitable idle state for the CPUs, while entering the system-wide suspend-to-idle sleep state, but also to the regular CPU idle time management.”…”�”}”(hj+h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MGhj¥h²hubjî)�”}”(hŒ±Note that, the management of the `cpu_wakeup_latency` file works according to the 'cpu_dma_latency' file from user space point of view. Moreover, the unit is also microseconds.”h]”(hŒ!Note that, the management of the ”…”�”}”(hjMh²hh³Nh´Nubj4)�”}”(hŒ`cpu_wakeup_latency`”h]”hŒcpu_wakeup_latency”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j3hjMubhŒ€ file works according to the ‘cpu_dma_latency’ file from user space point of view. Moreover, the unit is also microseconds.”…”�”}”(hjMh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MMhj¥h²hubeh}”(h]”(Œ,power-management-quality-of-service-for-cpus”j‚ eh ]”h"]”(Œ,power management quality of service for cpus”Œ cpu-pm-qos”eh$]”h&]”uh1j¸hjºh²hh³hÇh´Mþj¤ }”jsj�sj¦ }”j‚ j�sj»Kubj¹)�”}”(hhh]”(j¾)�”}”(hŒ+Idle States Control Via Kernel Command Line”h]”hŒ+Idle States Control Via Kernel Command Line”…”�”}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxh²hh³hÇh´MRubjî)�”}”(hŒØIn addition to the ``sysfs`` interface allowing individual idle states to be `disabled for individual CPUs `_, there are kernel command line parameters affecting CPU idle time management.”h]”(hŒIn addition to the ”…”�”}”(hj‰h²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchj‰ubhŒ1 interface allowing individual idle states to be ”…”�”}”(hj‰h²hh³Nh´Nubj+)�”}”(hŒ=`disabled for individual CPUs `_”h]”hŒdisabled for individual CPUs”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œdisabled for individual CPUs”j¹jëuh1j*hj‰j Kubj®)�”}”(hŒ ”h]”h}”(h]”h ]”h"]”•)[Œdisabled for individual cpus”ah$]”h&]”j¹jëuh1j­j Œidle-states-representation”hj‰j KubhŒN, there are kernel command line parameters affecting CPU idle time management.”…”�”}”(hj‰h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MThjxh²hubjî)�”}”(hXëThe ``cpuidle.off=1`` kernel command line option can be used to disable the CPU idle time management entirely. It does not prevent the idle loop from running on idle CPUs, but it prevents the CPU idle time governors and drivers from being invoked. If it is added to the kernel command line, the idle loop will ask the hardware to enter idle states on idle CPUs via the CPU architecture support code that is expected to provide a default mechanism for this purpose. That default mechanism usually is the least common denominator for all of the processors implementing the architecture (i.e. CPU instruction set) in question, however, so it is rather crude and not very energy-efficient. For this reason, it is not recommended for production use.”h]”(hŒThe ”…”�”}”(hjÉh²hh³Nh´Nubjd)�”}”(hŒ``cpuidle.off=1``”h]”hŒ cpuidle.off=1”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjÉubhXÖ kernel command line option can be used to disable the CPU idle time management entirely. It does not prevent the idle loop from running on idle CPUs, but it prevents the CPU idle time governors and drivers from being invoked. If it is added to the kernel command line, the idle loop will ask the hardware to enter idle states on idle CPUs via the CPU architecture support code that is expected to provide a default mechanism for this purpose. That default mechanism usually is the least common denominator for all of the processors implementing the architecture (i.e. CPU instruction set) in question, however, so it is rather crude and not very energy-efficient. For this reason, it is not recommended for production use.”…”�”}”(hjÉh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MXhjxh²hubjî)�”}”(hX¤The ``cpuidle.governor=`` kernel command line switch allows the ``CPUIdle`` governor to use to be specified. It has to be appended with a string matching the name of an available governor (e.g. ``cpuidle.governor=menu``) and that governor will be used instead of the default one. It is possible to force the ``menu`` governor to be used on the systems that use the ``ladder`` governor by default this way, for example.”h]”(hŒThe ”…”�”}”(hjéh²hh³Nh´Nubjd)�”}”(hŒ``cpuidle.governor=``”h]”hŒcpuidle.governor=”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjéubhŒ' kernel command line switch allows the ”…”�”}”(hjéh²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjéubhŒx governor to use to be specified. It has to be appended with a string matching the name of an available governor (e.g. ”…”�”}”(hjéh²hh³Nh´Nubjd)�”}”(hŒ``cpuidle.governor=menu``”h]”hŒcpuidle.governor=menu”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjéubhŒZ) and that governor will be used instead of the default one. It is possible to force the ”…”�”}”(hjéh²hh³Nh´Nubjd)�”}”(hŒ``menu``”h]”hŒmenu”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjéubhŒ1 governor to be used on the systems that use the ”…”�”}”(hjéh²hh³Nh´Nubjd)�”}”(hŒ ``ladder``”h]”hŒladder”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjéubhŒ+ governor by default this way, for example.”…”�”}”(hjéh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mchjxh²hubjî)�”}”(hŒÉThe other kernel command line parameters controlling CPU idle time management described below are only relevant for the *x86* architecture and references to ``intel_idle`` affect Intel processors only.”h]”(hŒxThe other kernel command line parameters controlling CPU idle time management described below are only relevant for the ”…”�”}”(hjQh²hh³Nh´Nubjr)�”}”(hŒ*x86*”h]”hŒx86”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjQubhŒ architecture and references to ”…”�”}”(hjQh²hh³Nh´Nubjd)�”}”(hŒ``intel_idle``”h]”hŒ intel_idle”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjQubhŒ affect Intel processors only.”…”�”}”(hjQh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mjhjxh²hubjî)�”}”(hX\The *x86* architecture support code recognizes three kernel command line options related to CPU idle time management: ``idle=poll``, ``idle=halt``, and ``idle=nomwait``. The first two of them disable the ``acpi_idle`` and ``intel_idle`` drivers altogether, which effectively causes the entire ``CPUIdle`` subsystem to be disabled and makes the idle loop invoke the architecture support code to deal with idle CPUs. How it does that depends on which of the two parameters is added to the kernel command line. In the ``idle=halt`` case, the architecture support code will use the ``HLT`` instruction of the CPUs (which, as a rule, suspends the execution of the program and causes the hardware to attempt to enter the shallowest available idle state) for this purpose, and if ``idle=poll`` is used, idle CPUs will execute a more or less "lightweight" sequence of instructions in a tight loop. [Note that using ``idle=poll`` is somewhat drastic in many cases, as preventing idle CPUs from saving almost any energy at all may not be the only effect of it. For example, on Intel hardware it effectively prevents CPUs from using P-states (see |cpufreq|) that require any number of CPUs in a package to be idle, so it very well may hurt single-thread computations performance as well as energy-efficiency. Thus using it for performance reasons may not be a good idea at all.]”h]”(hŒThe ”…”�”}”(hjƒh²hh³Nh´Nubjr)�”}”(hŒ*x86*”h]”hŒx86”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jqhjƒubhŒm architecture support code recognizes three kernel command line options related to CPU idle time management: ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ ``idle=poll``”h]”hŒ idle=poll”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒ, ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ ``idle=halt``”h]”hŒ idle=halt”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒ, and ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ``idle=nomwait``”h]”hŒ idle=nomwait”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒ%. The first two of them disable the ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒ and ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ``intel_idle``”h]”hŒ intel_idle”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒ9 drivers altogether, which effectively causes the entire ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒÕ subsystem to be disabled and makes the idle loop invoke the architecture support code to deal with idle CPUs. How it does that depends on which of the two parameters is added to the kernel command line. In the ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ ``idle=halt``”h]”hŒ idle=halt”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒ2 case, the architecture support code will use the ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ``HLT``”h]”hŒHLT”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒ¼ instruction of the CPUs (which, as a rule, suspends the execution of the program and causes the hardware to attempt to enter the shallowest available idle state) for this purpose, and if ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ ``idle=poll``”h]”hŒ idle=poll”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒ~ is used, idle CPUs will execute a more or less “lightweightâ€� sequence of instructions in a tight loop. [Note that using ”…”�”}”(hjƒh²hh³Nh´Nubjd)�”}”(hŒ ``idle=poll``”h]”hŒ idle=poll”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjƒubhŒØ is somewhat drastic in many cases, as preventing idle CPUs from saving almost any energy at all may not be the only effect of it. For example, on Intel hardware it effectively prevents CPUs from using P-states (see ”…”�”}”(hjƒh²hh³Nh´Nubh)�”}”(hj‘h]”j”)�”}”(hj‘h]”hŒCPU Performance Scaling”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”(jojŸj eh"]”h$]”h&]”uh1j“h³Nh´NhjQubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j|Œ refdomain”jŸŒreftype”j­Œ refexplicit”ˆŒrefwarn”ˆŒ reftarget”j°uh1hh³hÇh´Khjƒh²hubhŒß) that require any number of CPUs in a package to be idle, so it very well may hurt single-thread computations performance as well as energy-efficiency. Thus using it for performance reasons may not be a good idea at all.]”…”�”}”(hjƒh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´Mnhjxh²hubjî)�”}”(hXâThe ``idle=nomwait`` option prevents the use of ``MWAIT`` instruction of the CPU to enter idle states. When this option is used, the ``acpi_idle`` driver will use the ``HLT`` instruction instead of ``MWAIT``. On systems running Intel processors, this option disables the ``intel_idle`` driver and forces the use of the ``acpi_idle`` driver instead. Note that in either case, ``acpi_idle`` driver will function only if all the information needed by it is in the system's ACPI tables.”h]”(hŒThe ”…”�”}”(hjwh²hh³Nh´Nubjd)�”}”(hŒ``idle=nomwait``”h]”hŒ idle=nomwait”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjwubhŒ option prevents the use of ”…”�”}”(hjwh²hh³Nh´Nubjd)�”}”(hŒ ``MWAIT``”h]”hŒMWAIT”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjwubhŒL instruction of the CPU to enter idle states. When this option is used, the ”…”�”}”(hjwh²hh³Nh´Nubjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjwubhŒ driver will use the ”…”�”}”(hjwh²hh³Nh´Nubjd)�”}”(hŒ``HLT``”h]”hŒHLT”…”�”}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjwubhŒ instruction instead of ”…”�”}”(hjwh²hh³Nh´Nubjd)�”}”(hŒ ``MWAIT``”h]”hŒMWAIT”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjwubhŒ@. On systems running Intel processors, this option disables the ”…”�”}”(hjwh²hh³Nh´Nubjd)�”}”(hŒ``intel_idle``”h]”hŒ intel_idle”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjwubhŒ" driver and forces the use of the ”…”�”}”(hjwh²hh³Nh´Nubjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjwubhŒ+ driver instead. Note that in either case, ”…”�”}”(hjwh²hh³Nh´Nubjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjwubhŒ` driver will function only if all the information needed by it is in the system’s ACPI tables.”…”�”}”(hjwh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´M‚hjxh²hubjî)�”}”(hXªIn addition to the architecture-level kernel command line options affecting CPU idle time management, there are parameters affecting individual ``CPUIdle`` drivers that can be passed to them via the kernel command line. Specifically, the ``intel_idle.max_cstate=`` and ``processor.max_cstate=`` parameters, where ```` is an idle state index also used in the name of the given state's directory in ``sysfs`` (see `Representation of Idle States `_), causes the ``intel_idle`` and ``acpi_idle`` drivers, respectively, to discard all of the idle states deeper than idle state ````. In that case, they will never ask for any of those idle states or expose them to the governor. [The behavior of the two drivers is different for ```` equal to ``0``. Adding ``intel_idle.max_cstate=0`` to the kernel command line disables the ``intel_idle`` driver and allows ``acpi_idle`` to be used, whereas ``processor.max_cstate=0`` is equivalent to ``processor.max_cstate=1``. Also, the ``acpi_idle`` driver is part of the ``processor`` kernel module that can be loaded separately and ``max_cstate=`` can be passed to it as a module parameter when it is loaded.]”h]”(hŒ�In addition to the architecture-level kernel command line options affecting CPU idle time management, there are parameters affecting individual ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ ``CPUIdle``”h]”hŒCPUIdle”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒT drivers that can be passed to them via the kernel command line. Specifically, the ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``intel_idle.max_cstate=``”h]”hŒintel_idle.max_cstate=”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ and ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``processor.max_cstate=``”h]”hŒprocessor.max_cstate=”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ parameters, where ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ````”h]”hŒ”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒR is an idle state index also used in the name of the given state’s directory in ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ ``sysfs``”h]”hŒsysfs”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ (see ”…”�”}”(hjh²hh³Nh´Nubj+)�”}”(hŒ>`Representation of Idle States `_”h]”hŒRepresentation of Idle States”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒRepresentation of Idle States”j¹jëuh1j*hjj Kubj®)�”}”(hŒ ”h]”h}”(h]”h ]”h"]”Œrepresentation of idle states”ah$]”h&]”j¹jëuh1j­j Œidle-states-representation”hjj KubhŒ), causes the ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``intel_idle``”h]”hŒ intel_idle”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ and ”…”�”}”hjsbjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒQ drivers, respectively, to discard all of the idle states deeper than idle state ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ````”h]”hŒ”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ•. In that case, they will never ask for any of those idle states or expose them to the governor. [The behavior of the two drivers is different for ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ````”h]”hŒ”…”�”}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ equal to ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``0``”h]”hŒ0”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ . Adding ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``intel_idle.max_cstate=0``”h]”hŒintel_idle.max_cstate=0”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ) to the kernel command line disables the ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``intel_idle``”h]”hŒ intel_idle”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ driver and allows ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ to be used, whereas ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``processor.max_cstate=0``”h]”hŒprocessor.max_cstate=0”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ is equivalent to ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``processor.max_cstate=1``”h]”hŒprocessor.max_cstate=1”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ . Also, the ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ ``acpi_idle``”h]”hŒ acpi_idle”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ driver is part of the ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ ``processor``”h]”hŒ processor”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ1 kernel module that can be loaded separately and ”…”�”}”(hjh²hh³Nh´Nubjd)�”}”(hŒ``max_cstate=``”h]”hŒmax_cstate=”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jchjubhŒ> can be passed to it as a module parameter when it is loaded.]”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíh³hÇh´MŠhjxh²hubeh}”(h]”Œ+idle-states-control-via-kernel-command-line”ah ]”h"]”Œ+idle states control via kernel command line”ah$]”h&]”uh1j¸hjºh²hh³hÇh´MRubeh}”(h]”Œcpu-idle-time-management”ah ]”h"]”Œcpu idle time management”ah$]”h&]”uh1j¸hhh²hh³hÇh´K ubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(j½NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jºŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”(j jM jƒ j± j) j`j³j‡eŒsubstitution_defs”}”(hóhçjhöjjj jj/j#j>j2jMjAj\jPjkj_jzjnj‰j}j˜jŒj§j›j¶jªjÅj¹jÔjÈjãj×jòjæjjõjjjjj.j"j=j1jLj@j[jOjjj^jyjmjˆj|j—j‹j¦jšjµj©jÄj¸jÓjÇjâjÖjñjåjjôjjjjj-j!j<j0jKj?jZjNjij]jxjlj‡j{j–jŠj¥j™j´j¨jÃj·jÒjÆjájÕjðjäjÿjójjjjj,j j;j/jJj>jYjMjhj\jwjkj†jzj•j‰j¤j˜j³j§jÂj¶jÑjÅjàjÔjïjãjþjòj jjjj+jj:j.jIj=jXjLŒstruct cpuidle_state”j[jµj‹uŒsubstitution_names”}”(Œamp”hóŒapos”jŒast”jŒbrvbar”j Œbsol”j/Œcent”j>Œcolon”jMŒcomma”j\Œcommat”jkŒcopy”jzŒcurren”j‰Œdarr”j˜Œdeg”j§Œdivide”j¶Œdollar”jÅŒequals”jÔŒexcl”jãŒfrac12”jòŒfrac14”jŒfrac18”jŒfrac34”jŒfrac38”j.Œfrac58”j=Œfrac78”jLŒgt”j[Œhalf”jjŒhorbar”jyŒhyphen”jˆŒiexcl”j—Œiquest”j¦Œlaquo”jµŒlarr”jÄŒlcub”jÓŒldquo”jâŒlowbar”jñŒlpar”jŒlsqb”jŒlsquo”jŒlt”j-Œmicro”j<Œmiddot”jKŒnbsp”jZŒnot”jiŒnum”jxŒohm”j‡Œordf”j–Œordm”j¥Œpara”j´Œpercnt”jÃŒperiod”jÒŒplus”jáŒplusmn”jðŒpound”jÿŒquest”jŒquot”jŒraquo”j,Œrarr”j;Œrcub”jJŒrdquo”jYŒreg”jhŒrpar”jwŒrsqb”j†Œrsquo”j•Œsect”j¤Œsemi”j³Œshy”jÂŒsol”jÑŒsung”jàŒsup1”jïŒsup2”jþŒsup3”j Œtimes”jŒtrade”j+Œuarr”j:Œverbar”jIŒyen”jXŒstruct cpuidle_state”jöŒcpufreq”jµuŒrefnames”}”(Œteo-gov”]”(j jõeŒidle-cpus-and-tick”]”(jM j< j± j¡ eŒ cpu-pm-qos”]”(jƒ jr eŒmenu-gov”]”(j) j eŒ idle-loop”]”(j`jPeŒidle-states-representation”]”(j³j£j‡jweuŒrefids”}”(jº]”(j¯j`ejL ]”(j‘ jM j± ej‘ ]”(j‡ j) ej ]”(jÇ j ejë]”(jáj³j‡ej‚ ]”(j�jƒ euŒnameids”}”(j”j‘jÉjÆj+j(jÁj¾j¡ jºj  j� j˜ jL j— j” j× j‘ jÖ jÓ jòj jñjîj jëjŸjœjsj‚ jrjojŒj‰uŒ nametypes”}”(j”‰jɉj+‰jÁ‰j¡ ˆj  ‰j˜ ˆj— ‰j× ˆjÖ ‰jòˆjñ‰j ˆjŸ‰jsˆjr‰jŒ‰uh}”(j‘jºjÆjXj(j§j¾j.jºjÌj� jÌjL j¨ j” j¨ j‘ j� jÓ j� j jÜ jîjÜ jëj÷jœj÷j‚ j¥joj¥j‰jxuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”(hŒsystem_message”“”)�”}”(hhh]”jî)�”}”(hhh]”hŒ)Hyperlink target "teo" is not referenced.”…”�”}”hj„sbah}”(h]”h ]”h"]”h$]”h&]”uh1jíhj�ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”K¢uh1jubj€)�”}”(hhh]”jî)�”}”(hhh]”hŒ>Hyperlink target "stopped by the idle loop" is not referenced.”…”�”}”hjŸsbah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjœubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j™Œsource”hÇŒline”K¢uh1jubj€)�”}”(hhh]”jî)�”}”(hhh]”hŒ,Hyperlink target "pm qos" is not referenced.”…”�”}”hj¹sbah}”(h]”h ]”h"]”h$]”h&]”uh1jíhj¶ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j™Œsource”hÇŒline”M=uh1jubj€)�”}”(hhh]”jî)�”}”(hhh]”hŒ=Hyperlink target "stop the scheduler tick" is not referenced.”…”�”}”hjÓsbah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjÐubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j™Œsource”hÇŒline”MEuh1jubj€)�”}”(hhh]”jî)�”}”(hhh]”hŒ)Hyperlink target "one" is not referenced.”…”�”}”hjísbah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjêubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j™Œsource”hÇŒline”MTuh1jubj€)�”}”(hhh]”jî)�”}”(hhh]”hŒXHyperlink target "target residency and exit latency parameters of it" is not referenced.”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j™Œsource”hÇŒline”Mauh1jubj€)�”}”(hhh]”jî)�”}”(hhh]”hŒBHyperlink target "disabled for individual cpus" is not referenced.”…”�”}”hj!sbah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j™Œsource”hÇŒline”MTuh1jubj€)�”}”(hhh]”jî)�”}”(hhh]”hŒCHyperlink target "representation of idle states" is not referenced.”…”�”}”hj;sbah}”(h]”h ]”h"]”h$]”h&]”uh1jíhj8ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j™Œsource”hÇŒline”MŠuh1jubeŒ transformer”NŒ include_log”]”Œ(Documentation/admin-guide/pm/cpuidle.rst”(NNNNt”†”aŒ decoration”Nh²hub.