€•¥Œ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”Œ8/translations/zh_CN/admin-guide/thermal/intel_powerclamp”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/zh_TW/admin-guide/thermal/intel_powerclamp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/it_IT/admin-guide/thermal/intel_powerclamp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/ja_JP/admin-guide/thermal/intel_powerclamp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/ko_KR/admin-guide/thermal/intel_powerclamp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/sp_SP/admin-guide/thermal/intel_powerclamp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒIntel Powerclamp Driver”h]”hŒIntel Powerclamp Driver”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒR/var/lib/git/docbuild/linux/Documentation/admin-guide/thermal/intel_powerclamp.rst”h KubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ[By: - Arjan van de Ven - Jacob Pan ”h]”(hŒterm”“”)”}”(hŒBy:”h]”hŒBy:”…””}”(hhÄhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khh¾ubhŒ definition”“”)”}”(hhh]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ(Arjan van de Ven ”h]”hŒ paragraph”“”)”}”(hhàh]”(hŒArjan van de Ven <”…””}”(hhähžhhŸNh NubhŒ reference”“”)”}”(hŒarjan@linux.intel.com”h]”hŒarjan@linux.intel.com”…””}”(hhíhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:arjan@linux.intel.com”uh1hëhhäubhŒ>”…””}”(hhähžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h KhhÞubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜhhÙubhÝ)”}”(hŒ*Jacob Pan ”h]”hã)”}”(hŒ)Jacob Pan ”h]”(hŒ Jacob Pan <”…””}”(hjhžhhŸNh Nubhì)”}”(hŒjacob.jun.pan@linux.intel.com”h]”hŒjacob.jun.pan@linux.intel.com”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œ$mailto:jacob.jun.pan@linux.intel.com”uh1hëhjubhŒ>”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h Khj ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜhhÙubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1h×hŸh¶h KhhÔubah}”(h]”h ]”h"]”h$]”h&]”uh1hÒhh¾ubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hŸh¶h Khh¹ubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hh£hžhhŸNh NubhŒcomment”“”)”}”(hXContents: (*) Introduction - Goals and Objectives (*) Theory of Operation - Idle Injection - Calibration (*) Performance Analysis - Effectiveness and Limitations - Power vs Performance - Scalability - Calibration - Comparison with Alternative Techniques (*) Usage and Interfaces - Generic Thermal Layer (sysfs) - Kernel APIs (TBD) (*) Module Parameters”h]”hXContents: (*) Introduction - Goals and Objectives (*) Theory of Operation - Idle Injection - Calibration (*) Performance Analysis - Effectiveness and Limitations - Power vs Performance - Scalability - Calibration - Comparison with Alternative Techniques (*) Usage and Interfaces - Generic Thermal Layer (sysfs) - Kernel APIs (TBD) (*) Module Parameters”…””}”hjUsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jShh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ INTRODUCTION”h]”hŒ INTRODUCTION”…””}”(hjhhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjehžhhŸh¶h K ubhã)”}”(hXDConsider the situation where a system’s power consumption must be reduced at runtime, due to power budget, thermal constraint, or noise level, and where active cooling is not preferred. Software managed passive power reduction must be performed to prevent the hardware actions that are designed for catastrophic scenarios.”h]”hXDConsider the situation where a system’s power consumption must be reduced at runtime, due to power budget, thermal constraint, or noise level, and where active cooling is not preferred. Software managed passive power reduction must be performed to prevent the hardware actions that are designed for catastrophic scenarios.”…””}”(hjvhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h K"hjehžhubhã)”}”(hŒ`Currently, P-states, T-states (clock modulation), and CPU offlining are used for CPU throttling.”h]”hŒ`Currently, P-states, T-states (clock modulation), and CPU offlining are used for CPU throttling.”…””}”(hj„hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h K(hjehžhubhã)”}”(hXKOn Intel CPUs, C-states provide effective power reduction, but so far they’re only used opportunistically, based on workload. With the development of intel_powerclamp driver, the method of synchronizing idle injection across all online CPU threads was introduced. The goal is to achieve forced and controllable C-state residency.”h]”hXKOn Intel CPUs, C-states provide effective power reduction, but so far they’re only used opportunistically, based on workload. With the development of intel_powerclamp driver, the method of synchronizing idle injection across all online CPU threads was introduced. The goal is to achieve forced and controllable C-state residency.”…””}”(hj’hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h K+hjehžhubhã)”}”(hŒÂTest/Analysis has been made in the areas of power, performance, scalability, and user experience. In many cases, clear advantage is shown over taking the CPU offline or modulating the CPU clock.”h]”hŒÂTest/Analysis has been made in the areas of power, performance, scalability, and user experience. In many cases, clear advantage is shown over taking the CPU offline or modulating the CPU clock.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h K1hjehžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K ubh¢)”}”(hhh]”(h§)”}”(hŒTHEORY OF OPERATION”h]”hŒTHEORY OF OPERATION”…””}”(hj¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj¶hžhhŸh¶h K7ubh¢)”}”(hhh]”(h§)”}”(hŒIdle Injection”h]”hŒIdle Injection”…””}”(hjÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÇhžhhŸh¶h K:ubhã)”}”(hŒ‡On modern Intel processors (Nehalem or later), package level C-state residency is available in MSRs, thus also available to the kernel.”h]”hŒ‡On modern Intel processors (Nehalem or later), package level C-state residency is available in MSRs, thus also available to the kernel.”…””}”(hjØhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h K /sys/class/thermal/cooling_device80/cur_state ”h]”(hã)”}”(hŒTo inject 25% idle time::”h]”hŒTo inject 25% idle time:”…””}”(hjµhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h M!hj±ubjõ)”}”(hŒE$ sudo sh -c "echo 25 > /sys/class/thermal/cooling_device80/cur_state”h]”hŒE$ sudo sh -c "echo 25 > /sys/class/thermal/cooling_device80/cur_state”…””}”hjÃsbah}”(h]”h ]”h"]”h$]”h&]”jcjduh1jôhŸh¶h M#hj±ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÜhj®hžhhŸh¶h Nubah}”(h]”h ]”h"]”h$]”h&]”j?j@uh1h×hŸh¶h M!hjehžhubhã)”}”(hŒ³If the system is not busy and has more than 25% idle time already, then the powerclamp driver will not start idle injection. Using Top will not show idle injection kernel threads.”h]”hŒ³If the system is not busy and has more than 25% idle time already, then the powerclamp driver will not start idle injection. Using Top will not show idle injection kernel threads.”…””}”(hjÝhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h M%hjehžhubhã)”}”(hŒãIf the system is busy (spin test below) and has less than 25% natural idle time, powerclamp kernel threads will do idle injection. Forced idle time is accounted as normal idle in that common code path is taken as the idle task.”h]”hŒãIf the system is busy (spin test below) and has less than 25% natural idle time, powerclamp kernel threads will do idle injection. Forced idle time is accounted as normal idle in that common code path is taken as the idle task.”…””}”(hjëhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h M)hjehžhubhã)”}”(hŒ’In this example, 24.1% idle is shown. This helps the system admin or user determine the cause of slowdown, when a powerclamp driver is in action::”h]”hŒ‘In this example, 24.1% idle is shown. This helps the system admin or user determine the cause of slowdown, when a powerclamp driver is in action:”…””}”(hjùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h M.hjehžhubjõ)”}”(hX§Tasks: 197 total, 1 running, 196 sleeping, 0 stopped, 0 zombie Cpu(s): 71.2%us, 4.7%sy, 0.0%ni, 24.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 3943228k total, 1689632k used, 2253596k free, 74960k buffers Swap: 4087804k total, 0k used, 4087804k free, 945336k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3352 jacob 20 0 262m 644 428 S 286 0.0 0:17.16 spin 3341 root -51 0 0 0 0 D 25 0.0 0:01.62 kidle_inject/0 3344 root -51 0 0 0 0 D 25 0.0 0:01.60 kidle_inject/3 3342 root -51 0 0 0 0 D 25 0.0 0:01.61 kidle_inject/1 3343 root -51 0 0 0 0 D 25 0.0 0:01.60 kidle_inject/2 2935 jacob 20 0 696m 125m 35m S 5 3.3 0:31.11 firefox 1546 root 20 0 158m 20m 6640 S 3 0.5 0:26.97 Xorg 2100 jacob 20 0 1223m 88m 30m S 3 2.3 0:23.68 compiz”h]”hX§Tasks: 197 total, 1 running, 196 sleeping, 0 stopped, 0 zombie Cpu(s): 71.2%us, 4.7%sy, 0.0%ni, 24.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 3943228k total, 1689632k used, 2253596k free, 74960k buffers Swap: 4087804k total, 0k used, 4087804k free, 945336k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3352 jacob 20 0 262m 644 428 S 286 0.0 0:17.16 spin 3341 root -51 0 0 0 0 D 25 0.0 0:01.62 kidle_inject/0 3344 root -51 0 0 0 0 D 25 0.0 0:01.60 kidle_inject/3 3342 root -51 0 0 0 0 D 25 0.0 0:01.61 kidle_inject/1 3343 root -51 0 0 0 0 D 25 0.0 0:01.60 kidle_inject/2 2935 jacob 20 0 696m 125m 35m S 5 3.3 0:31.11 firefox 1546 root 20 0 158m 20m 6640 S 3 0.5 0:26.97 Xorg 2100 jacob 20 0 1223m 88m 30m S 3 2.3 0:23.68 compiz”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jcjduh1jôhŸh¶h M2hjehžhubhã)”}”(hX?Tests have shown that by using the powerclamp driver as a cooling device, a PID based userspace thermal controller can manage to control CPU temperature effectively, when no other thermal influence is added. For example, a UltraBook user can compile the kernel under certain temperature (below most active trip points).”h]”hX?Tests have shown that by using the powerclamp driver as a cooling device, a PID based userspace thermal controller can manage to control CPU temperature effectively, when no other thermal influence is added. For example, a UltraBook user can compile the kernel under certain temperature (below most active trip points).”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h MAhjehžhubeh}”(h]”Œusage-and-interfaces”ah ]”h"]”Œusage and interfaces”ah$]”h&]”uh1h¡hh£hžhhŸh¶h M ubh¢)”}”(hhh]”(h§)”}”(hŒModule Parameters”h]”hŒModule Parameters”…””}”(hj.hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj+hžhhŸh¶h MHubh¸)”}”(hhh]”(h½)”}”(hXu``cpumask`` (RW) A bit mask of CPUs to inject idle. The format of the bitmask is same as used in other subsystems like in /proc/irq/\*/smp_affinity. The mask is comma separated 32 bit groups. Each CPU is one bit. For example for a 256 CPU system the full mask is: ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff The rightmost mask is for CPU 0-32. ”h]”(hÃ)”}”(hŒ``cpumask`` (RW)”h]”(hŒliteral”“”)”}”(hŒ ``cpumask``”h]”hŒcpumask”…””}”(hjIhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jGhjCubhŒ (RW)”…””}”(hjChžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h MQhj?ubhÓ)”}”(hhh]”(hã)”}”(hX>A bit mask of CPUs to inject idle. The format of the bitmask is same as used in other subsystems like in /proc/irq/\*/smp_affinity. The mask is comma separated 32 bit groups. Each CPU is one bit. For example for a 256 CPU system the full mask is: ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff”h]”hX>A bit mask of CPUs to inject idle. The format of the bitmask is same as used in other subsystems like in /proc/irq/*/smp_affinity. The mask is comma separated 32 bit groups. Each CPU is one bit. For example for a 256 CPU system the full mask is: ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff”…””}”(hjdhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h MKhjaubhã)”}”(hŒ#The rightmost mask is for CPU 0-32.”h]”hŒ#The rightmost mask is for CPU 0-32.”…””}”(hjrhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h MQhjaubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÒhj?ubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hŸh¶h MQhj<ubh½)”}”(hX‡``max_idle`` (RW) Maximum injected idle time to the total CPU time ratio in percent range from 1 to 100. Even if the cooling device max_state is always 100 (100%), this parameter allows to add a max idle percent limit. The default is 50, to match the current implementation of powerclamp driver. Also doesn't allow value more than 75, if the cpumask includes every CPU present in the system.”h]”(hÃ)”}”(hŒ``max_idle`` (RW)”h]”(jH)”}”(hŒ ``max_idle``”h]”hŒmax_idle”…””}”(hj”hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jGhjubhŒ (RW)”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h MXhjŒubhÓ)”}”(hhh]”hã)”}”(hXuMaximum injected idle time to the total CPU time ratio in percent range from 1 to 100. Even if the cooling device max_state is always 100 (100%), this parameter allows to add a max idle percent limit. The default is 50, to match the current implementation of powerclamp driver. Also doesn't allow value more than 75, if the cpumask includes every CPU present in the system.”h]”hXwMaximum injected idle time to the total CPU time ratio in percent range from 1 to 100. Even if the cooling device max_state is always 100 (100%), this parameter allows to add a max idle percent limit. The default is 50, to match the current implementation of powerclamp driver. Also doesn’t allow value more than 75, if the cpumask includes every CPU present in the system.”…””}”(hj¯hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhŸh¶h MThj¬ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÒhjŒubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hŸh¶h MXhj<hžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hj+hžhhŸh¶h Nubeh}”(h]”Œmodule-parameters”ah ]”h"]”Œmodule parameters”ah$]”h&]”uh1h¡hh£hžhhŸh¶h MHubeh}”(h]”Œintel-powerclamp-driver”ah ]”h"]”Œintel powerclamp driver”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦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”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jÜjÙj³j°jÑjÎj‡j„j¢jŸjÉjÆjbj_j%j"jZjWj(j%jÔjÑuŒ nametypes”}”(j܉j³‰jщj‡‰j¢‰jɉjb‰j%‰jZ‰j(‰jÔ‰uh}”(jÙh£j°jejÎj¶j„jÇjŸjŠjÆj¥j_jÔj"jójWj(j%jejÑj+uŒ 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”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.