summaryrefslogtreecommitdiff
path: root/Documentation/thermal/intel_powerclamp.txt
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2017-04-14 21:19:24 +0300
committerJonathan Corbet <corbet@lwn.net>2017-04-21 00:35:03 +0300
commitd73350568cc773863d2587b06c4d7362e4df92c7 (patch)
treee3b15cac22b9fa5934ae2145f7d2d3aa98b8a970 /Documentation/thermal/intel_powerclamp.txt
parent50c28f803a2353d87ecce7412f3d6ae5cb80cd88 (diff)
downloadlinux-d73350568cc773863d2587b06c4d7362e4df92c7.tar.xz
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>
Diffstat (limited to 'Documentation/thermal/intel_powerclamp.txt')
-rw-r--r--Documentation/thermal/intel_powerclamp.txt20
1 files changed, 15 insertions, 5 deletions
diff --git a/Documentation/thermal/intel_powerclamp.txt b/Documentation/thermal/intel_powerclamp.txt
index 60073dc9f748..b5df21168fbc 100644
--- a/Documentation/thermal/intel_powerclamp.txt
+++ b/Documentation/thermal/intel_powerclamp.txt
@@ -268,6 +268,15 @@ cur_state:0
max_state:50
type:intel_powerclamp
+cur_state allows user to set the desired idle percentage. Writing 0 to
+cur_state will stop idle injection. Writing a value between 1 and
+max_state will start the idle injection. Reading cur_state returns the
+actual and current idle percentage. This may not be the same value
+set by the user in that current idle percentage depends on workload
+and includes natural idle. When idle injection is disabled, reading
+cur_state returns value -1 instead of 0 which is to avoid confusing
+100% busy state with the disabled state.
+
Example usage:
- To inject 25% idle time
$ sudo sh -c "echo 25 > /sys/class/thermal/cooling_device80/cur_state
@@ -278,11 +287,12 @@ then the powerclamp driver will not start idle injection. Using Top
will not show idle injection kernel threads.
If the system is busy (spin test below) and has less than 25% natural
-idle time, powerclamp kernel threads will do idle injection, which
-appear running to the scheduler. But the overall system idle is still
-reflected. 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.
+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.
+
+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.
Tasks: 197 total, 1 running, 196 sleeping, 0 stopped, 0 zombie