cpuidle: Add validated metrics for idle states
cpuidle: Add validated metrics for idle states

The idle states are characterized by latency and residency
numbers which determine the breakeven point for entry into them. The
latency is a measure of the exit overhead from the idle state and
residency is the minimum amount of time that a CPU must be predicted
to be idle so as to reap the powersavings from entering into that idle
state.

These numbers are made use of by the cpuidle governors in the kernel to
arrive at the appropriate idle state that a CPU must enter into when there is
no work to be done. Today the kernel uses the latency numbers given by the
firmware. To arrive at a value for residency, it uses a  multiplier of 10 on
the latency number. The latency number coded in the firmware is inaccurate
as is the technique for calculating the residency. This patch codes in the
the measured latency numbers for the idle states. The residency numbers have
been arrived at experimentally after ensuring that the performance of latency
sensitive workloads do not regress while allowing deeper idle states to be
entered into during low load situations. The kernel is expected to use these
values for optimal power efficiency.

Signed-off-by: Preeti U Murthy <437f8f4633f3d09bf55bbcfb98d29bc10a99c7d0@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>

csmart/skiboot,shenki/skiboot,qemu/skiboot,cyrilbur-ibm/skiboot,ddstreet/skiboot,shenki/skiboot,shenki/skiboot,legoater/skiboot,jk-ozlabs/skiboot,legoater/skiboot,neelegup/skiboot,mikey/skiboot,csmart/skiboot,shenki/skiboot,open-power/skiboot,csmart/skiboot,apopple/skiboot,legoater/skiboot,mikey/skiboot,shenki/skiboot,apopple/skiboot,stewart-ibm/skiboot,open-power/skiboot,qemu/skiboot,jk-ozlabs/skiboot,neelegup/skiboot,cyrilbur-ibm/skiboot,legoater/skiboot,open-power/skiboot,stewart-ibm/skiboot,neelegup/skiboot,open-power/skiboot,qemu/skiboot,cyrilbur-ibm/skiboot,stewart-ibm/skiboot,qemu/skiboot,qemu/skiboot,jk-ozlabs/skiboot,apopple/skiboot,open-power/skiboot,mikey/skiboot,ddstreet/skiboot,legoater/skiboot,ddstreet/skiboot