mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marco Correia <mvc@netcabo.pt>
To: linux-kernel@vger.kernel.org
Subject: why is rdtsc reporting wrong cpu cycles?
Date: Sat, 3 Jan 2004 15:48:39 +0000	[thread overview]
Message-ID: <200401031548.40025.mvc@netcabo.pt> (raw)

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>


             reply	other threads:[~2004-01-03 15:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-03 15:48 Marco Correia [this message]
2004-01-03 16:55 ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401031548.40025.mvc@netcabo.pt \
    --to=mvc@netcabo.pt \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®