cpuidle: record state entry rejection statistics
authorLina Iyer <ilina@codeaurora.org>
Tue, 22 Sep 2020 18:34:16 +0000 (12:34 -0600)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 23 Sep 2020 12:10:31 +0000 (14:10 +0200)
commitf49735f4978f479b0de4f50ab217d5a56bc83c55
treeff16650624327711ecff8d9a6b2b885585dd9245
parent70c179b49870929ca183421935415622d30875b5
cpuidle: record state entry rejection statistics

CPUs may fail to enter the chosen idle state if there was a
pending interrupt, causing the cpuidle driver to return an error
value.

Record that and export it via sysfs along with the other idle state
statistics.

This could prove useful in understanding behavior of the governor
and the system during usecases that involve multiple CPUs.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
[ rjw: Changelog and documentation edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/admin-guide/pm/cpuidle.rst
drivers/cpuidle/cpuidle.c
drivers/cpuidle/sysfs.c
include/linux/cpuidle.h