Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Doc/PM: Sync with intel_powerclamp code behavior

Commit feb6cd6a0f9f ("thermal/intel_powerclamp: stop sched tick in forced
idle") changed how idle injection accouting, so we need to update
the documentation accordingly.

This patch also expands more details on the behavior of cur_state.

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reported-by: Wang, Xiaolong <xiaolong.wang@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Jacob Pan and committed by
Jonathan Corbet
d7335056 50c28f80

+15 -5
+15 -5
Documentation/thermal/intel_powerclamp.txt
··· 268 268 max_state:50 269 269 type:intel_powerclamp 270 270 271 + cur_state allows user to set the desired idle percentage. Writing 0 to 272 + cur_state will stop idle injection. Writing a value between 1 and 273 + max_state will start the idle injection. Reading cur_state returns the 274 + actual and current idle percentage. This may not be the same value 275 + set by the user in that current idle percentage depends on workload 276 + and includes natural idle. When idle injection is disabled, reading 277 + cur_state returns value -1 instead of 0 which is to avoid confusing 278 + 100% busy state with the disabled state. 279 + 271 280 Example usage: 272 281 - To inject 25% idle time 273 282 $ sudo sh -c "echo 25 > /sys/class/thermal/cooling_device80/cur_state ··· 287 278 will not show idle injection kernel threads. 288 279 289 280 If the system is busy (spin test below) and has less than 25% natural 290 - idle time, powerclamp kernel threads will do idle injection, which 291 - appear running to the scheduler. But the overall system idle is still 292 - reflected. In this example, 24.1% idle is shown. This helps the 293 - system admin or user determine the cause of slowdown, when a 294 - powerclamp driver is in action. 281 + idle time, powerclamp kernel threads will do idle injection. Forced 282 + idle time is accounted as normal idle in that common code path is 283 + taken as the idle task. 284 + 285 + In this example, 24.1% idle is shown. This helps the system admin or 286 + user determine the cause of slowdown, when a powerclamp driver is in action. 295 287 296 288 297 289 Tasks: 197 total, 1 running, 196 sleeping, 0 stopped, 0 zombie