cpuidle: add a sysfs entry to disable specific C state for debug purpose.
authorShuoX Liu <shuox.liu@intel.com>
Wed, 28 Mar 2012 22:19:11 +0000 (15:19 -0700)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 7 Apr 2012 22:18:05 +0000 (01:18 +0300)
commitd4c3a8ac5f89eaaf5265d781fe893005cb5f3a0a
treeb3b6c8de27899417c5945c74ec6876fc1874ea95
parent7eed7cc3f0f4f3118d0f83e2fd8f05742b0b402c
cpuidle: add a sysfs entry to disable specific C state for debug purpose.

Some C states of new CPU might be not good.  One reason is BIOS might
configure them incorrectly.  To help developers root cause it quickly, the
patch adds a new sysfs entry, so developers could disable specific C state
manually.

In addition, C state might have much impact on performance tuning, as it
takes much time to enter/exit C states, which might delay interrupt
processing.  With the new debug option, developers could check if a deep C
state could impact performance and how much impact it could cause.

Also add this option in Documentation/cpuidle/sysfs.txt.

[akpm@linux-foundation.org: check kstrtol return value]
Signed-off-by: ShuoX Liu <shuox.liu@intel.com>
Reviewed-by: Yanmin Zhang <yanmin_zhang@intel.com>
Reviewed-and-Tested-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Documentation/cpuidle/sysfs.txt
drivers/cpuidle/cpuidle.c
drivers/cpuidle/governors/menu.c
drivers/cpuidle/sysfs.c
include/linux/cpuidle.h