cpuidle: add a sysfs entry to disable specific C state for debug purpose.
authorShuoX Liu <[email protected]>
Wed, 28 Mar 2012 22:19:11 +0000 (15:19 -0700)
committerLen Brown <[email protected]>
Fri, 30 Mar 2012 05:52:58 +0000 (01:52 -0400)
commit3a53396b0381ec9d5180fd8fe7a681c8ce95fd9a
tree60a0770554c64250900ccf827ff868b483ae92fe
parent6a6ea0acc9375571a13aa8c4e105a0807e1c16a4
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.

[[email protected]: check kstrtol return value]
Signed-off-by: ShuoX Liu <[email protected]>
Reviewed-by: Yanmin Zhang <[email protected]>
Reviewed-and-Tested-by: Deepthi Dharwar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
Documentation/cpuidle/sysfs.txt
drivers/cpuidle/cpuidle.c
drivers/cpuidle/governors/menu.c
drivers/cpuidle/sysfs.c
include/linux/cpuidle.h