2009-10-26 15:06:39

by pradeep hettiarachchi

[permalink] [raw]
Subject: Frequency Scaling on Intel Core 2 Duo Processors

Hi,

I am working on a research in real-time systems. If I want to change
the frequency of the system as rapidly as possible, what is the best
method ? At the moment I write MSR_IA32_PERF_CTL, MSR directly with
the pre-found(calculated, encoded) values** for different frequencies.
I found the entire transition (latency) takes multiple milliseconds to
complete; however, I want some faster method to change the CPU
frequency.
Thank you in advance.


-Pradeep

** Initially I change the CPU frequency by some other method, such as
methods provided by an available user-space governor, and record the
MSR_IA32_PERF_STATUS values corresponding to that frequency. Later, I
change the relevant bits of MSR_IA32_PERF_CTL, with the values I got
previously, to achieve the relevant anticipated speed.


2009-10-27 11:31:06

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: Frequency Scaling on Intel Core 2 Duo Processors

On Mon, 26 Oct 2009 11:06:23 EDT, pradeep hettiarachchi said:
> Hi,
>
> I am working on a research in real-time systems. If I want to change
> the frequency of the system as rapidly as possible, what is the best
> method ? At the moment I write MSR_IA32_PERF_CTL, MSR directly with
> the pre-found(calculated, encoded) values** for different frequencies.
> I found the entire transition (latency) takes multiple milliseconds to
> complete; however, I want some faster method to change the CPU
> frequency.

You're going to have a hard time making it switch any faster than the value
listed in /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency
though I admit I'm not awake enough yet to be sure what the units of that file
are...


Attachments:
(No filename) (227.00 B)