Skip to contentSkip to conversation

how do I measure the time it takes to switch between frequencies?

DISCUSSION Ankur Shah 2 participants 2 messages Nov 1, 2007 – Nov 5, 2007

lore
Share & tools
lore

Ankur Shah

author
#0 lore raw

Hello folks,

I am trying to evaluate the performance of parallel benchmarks at various frequencies and was wondering how would I actually go about measuring the time it takes to switch between 2 frequencies.
(I am guessing since rdtsc is measured based on cycles, it is kindof useless when the frequency itself it changing)
Any ideas on how would I go about doing this?

-Ankur

#1 lore raw

If your PC has a parallel port, you can use the outb instruction to write arbitrary bytes to the parallel port. One of the system headers has a wrapper for outb, so it is easy to call from C code. Set one bit on the parallel port high before the frequency transition and set it low after the frequency transition. You can use an oscilloscope to measure the transition time.

There are several caveats. First, changing the state of the parallel port takes about 1 microsecond. If 1 microsecond is a significant part of the transition time, then you will have to find a different technique. Second, the outb instruction only works if you are root, or if root uses ioperm or iopl to pass the right to use the port to a child process.

Bill Dieter.

Quoted 17 lines · Ankur Shah

Hello folks,

I am trying to evaluate the performance of parallel benchmarks at various frequencies and was wondering how would I actually go about measuring the time it takes to switch between 2 frequencies.
(I am guessing since rdtsc is measured based on cycles, it is kindof useless
when the frequency itself it changing)
Any ideas on how would I go about doing this?

-Ankur
_______________________________________________
Cpufreq mailing list
[email protected]
http://lists.linux.org.uk/mailman/listinfo/cpufreq