intel_pstate: add sample time scaling
authorDirk Brandewie <dirk.j.brandewie@intel.com>
Thu, 29 May 2014 16:32:24 +0000 (09:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jun 2014 18:54:13 +0000 (11:54 -0700)
commitfb145ac9f30cf84d18a26b63e18c94849be54313
treebc54381269e6d3bb2d522a7e94bf80616d422a59
parent85db8604350ab6eb012a08fb6b81eb840201eb29
intel_pstate: add sample time scaling

commit c4ee841f602e5eef8eab673295c49c5b49d7732b upstream.

The PID assumes that samples are of equal time, which for a deferable
timers this is not true when the system goes idle.  This causes the
PID to take a long time to converge to the min P state and depending
on the pattern of the idle load can make the P state appear stuck.

The hold-off value of three sample times before using the scaling is
to give a grace period for applications that have high performance
requirements and spend a lot of time idle,  The poster child for this
behavior is the ffmpeg benchmark in the Phoronix test suite.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/intel_pstate.c