* why is rdtsc reporting wrong cpu cycles?
@ 2004-01-03 15:48 Marco Correia
2004-01-03 16:55 ` Willy Tarreau
0 siblings, 1 reply; 2+ messages in thread
From: Marco Correia @ 2004-01-03 15:48 UTC (permalink / raw)
To: linux-kernel
Hi,
I'm using the following function for getting the number of CPU cycles elapsed
since I rebooted:
/* Read Timer Stamp Counter */
unsigned long long int rdtsc(void)
{
unsigned long long int x;
__asm__ volatile(".byte 0x0f,0x31" : "=A" (x));
return x;
}
The problem is that the value I get dividing by my processor frequency (my
computer is a 650Mhz toshiba satellite pro 4340) is giving me about 1 hour
and I'm using the computer for about 4 fours.
Am I forgetting something obvious? I already googled around but I came to the
conclusion that only new P4 M processors are able to change speed.
I'm sorry if this is not the place to ask.
Thanks
Marco
ps: Please CC me as I'm not subscribed
--
Marco Correia <mvc@netcabo.pt>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: why is rdtsc reporting wrong cpu cycles?
2004-01-03 15:48 why is rdtsc reporting wrong cpu cycles? Marco Correia
@ 2004-01-03 16:55 ` Willy Tarreau
0 siblings, 0 replies; 2+ messages in thread
From: Willy Tarreau @ 2004-01-03 16:55 UTC (permalink / raw)
To: Marco Correia; +Cc: linux-kernel
Hi Marco,
On Sat, Jan 03, 2004 at 03:48:39PM +0000, Marco Correia wrote:
> The problem is that the value I get dividing by my processor frequency (my
> computer is a 650Mhz toshiba satellite pro 4340) is giving me about 1 hour
> and I'm using the computer for about 4 fours.
>
> Am I forgetting something obvious? I already googled around but I came to the
> conclusion that only new P4 M processors are able to change speed.
Perhaps it supports throttling. My mobile athlon supports this : 10000 times
a second, it is stopped for a certain amount of time, then resumed. Depending
on the throttling factor, I can even here it !
Cheers,
Willy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-03 16:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-03 15:48 why is rdtsc reporting wrong cpu cycles? Marco Correia
2004-01-03 16:55 ` Willy Tarreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®