summaryrefslogtreecommitdiff
path: root/include/linux/cpuidle.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-03-14 12:27:21 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-03-29 13:06:08 +0200
commit64bdff698092aa6be28c3b248f887022eec77902 (patch)
tree312a8e3d256011d26204fce782f481aeaa5a58e2 /include/linux/cpuidle.h
parent8919d779f1fd1ea8b06a46249f1a13c835b736af (diff)
downloadlwn-64bdff698092aa6be28c3b248f887022eec77902.tar.gz
lwn-64bdff698092aa6be28c3b248f887022eec77902.zip
PM: cpuidle/suspend: Add s2idle usage and time state attributes
Add a new attribute group called "s2idle" under the sysfs directory of each cpuidle state that supports the ->enter_s2idle callback and put two new attributes, "usage" and "time", into that group to represent the number of times the given state was requested for suspend-to-idle and the total time spent in suspend-to-idle after requesting that state, respectively. That will allow diagnostic information related to suspend-to-idle to be collected without enabling advanced debug features and analyzing dmesg output. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r--include/linux/cpuidle.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 0b3fc229086c..a806e94c482f 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -33,6 +33,10 @@ struct cpuidle_state_usage {
unsigned long long disable;
unsigned long long usage;
unsigned long long time; /* in US */
+#ifdef CONFIG_SUSPEND
+ unsigned long long s2idle_usage;
+ unsigned long long s2idle_time; /* in US */
+#endif
};
struct cpuidle_state {