diff options
author | Pallipadi, Venkatesh <venkatesh.pallipadi@intel.com> | 2009-03-19 17:41:40 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-03-27 21:21:09 -0400 |
commit | a59d1637eb0e0a37ee0e5c92800c60abe3624e24 (patch) | |
tree | 8cc6a7235fc746bd77da4e756f784d80aff316b0 | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) |
ACPI: cap off P-state transition latency from buggy BIOSes
Some BIOSes report very high frequency transition latency which are plainly
wrong on CPus that can change frequency using native MSR interface.
One such system is IBM T42 (2327-8ZU) as reported by Owen Taylor and
Rik van Riel.
cpufreq_ondemand driver uses this transition latency to come up with a
reasonable sampling interval to sample CPU usage and with such high
latency value, ondemand sampling interval ends up being very high
(0.5 sec, in this particular case), resulting in performance impact due to
slow response to increasing frequency.
Fix it by capping-off the transition latency to 20uS for native MSR based
frequency transitions.
mjg: We've confirmed that this also helps on the X31
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 4b1c319d30c..89c676d6caf 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -680,6 +680,18 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
680 | perf->states[i].transition_latency * 1000; | 680 | perf->states[i].transition_latency * 1000; |
681 | } | 681 | } |
682 | 682 | ||
683 | /* Check for high latency (>20uS) from buggy BIOSes, like on T42 */ | ||
684 | if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE && | ||
685 | policy->cpuinfo.transition_latency > 20 * 1000) { | ||
686 | static int print_once; | ||
687 | policy->cpuinfo.transition_latency = 20 * 1000; | ||
688 | if (!print_once) { | ||
689 | print_once = 1; | ||
690 | printk(KERN_INFO "Capping off P-state tranision latency" | ||
691 | " at 20 uS\n"); | ||
692 | } | ||
693 | } | ||
694 | |||
683 | data->max_freq = perf->states[0].core_frequency * 1000; | 695 | data->max_freq = perf->states[0].core_frequency * 1000; |
684 | /* table init */ | 696 | /* table init */ |
685 | for (i=0; i<perf->state_count; i++) { | 697 | for (i=0; i<perf->state_count; i++) { |