From: "Mao Yilu" <ylmao@mail.ustc.edu.cn>
To: "'Robert Hancock'" <hancockrwd@gmail.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: TSC unstable on Intel Pentium M processor 750
Date: Thu, 30 Apr 2009 08:32:30 +0800 [thread overview]
Message-ID: <441051630.11976@ustc.edu.cn> (raw)
Message-ID: <654E14825BCE4C9B94E5986000DC9BCE@xiaomao> (raw)
In-Reply-To: <441049102.10204@ustc.edu.cn>
Thank you for your reply.
But I still don't know why the TSC is not correct in the C1 state (hlt instruction). Is there anything more to influence the TSC? What happened when the CPU is not running under hlt instruction?
Thank you.
Mao Yilu
-----Original Message-----
From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Robert Hancock
Sent: Thursday, April 30, 2009 7:50 AM
To: Mao Yilu
Cc: linux-kernel@vger.kernel.org
Subject: Re: TSC unstable on Intel Pentium M processor 750
Mao Yilu wrote:
> Hi,
>
> I masked all the interrupts except keyboard interrupt before the instruction “hlt”, So the CPU ran nothing until I click the keyboard button. And I used “rdtscll” and “do_gettimeofday” to get the halt time. But the result of “do_gettimeofday” was longer than the one of “rdtscll” about 3s per minute. I don’t know why.
> I timed some math job using the same way in contrary to the “hlt” instruction. The TSC was not correct either. In 3 minutes, the result of “do_gettimeofday” was longer than the one of “rdtscll” about 5s.
> The processor is Intel Pentium M processor 750. From the software developer’s manual of Intel, the processor clock of Pentium M processors is impacted by Intel SpeedStep technology, while some other processors is not. Maybe this is another feature Pentium M processors own.
> Pentium M processors support 5 C-states. I am sure the TSC doesn’t stop in C0 and C1 states. But I am not sure about other states. Maybe other states will stop the clock, and “hlt” instruction will make the CPU into deeper state.
> These are my guess. I wanna the truth. Thank you.
>
> Mao Yilu
>
On many processors the TSC will stop in various C-states, and also the
TSC frequency changes when CPU frequency changes. This is why using
rdtsc in userspace is not reliable, since the code can't know whether or
not TSC can be used on that CPU reliably or how to scale the results.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2009-04-30 0:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-26 14:59 TSC unstable on Intel Pentium M processor 750 Mao Yilu
2009-04-26 14:59 ` Mao Yilu
2009-04-29 23:50 ` Robert Hancock
[not found] ` <441049102.10204@ustc.edu.cn>
2009-04-30 0:32 ` Mao Yilu [this message]
2009-04-30 0:32 ` Mao Yilu
2009-04-30 3:11 ` Henrique de Moraes Holschuh
[not found] ` <441061189.03958@ustc.edu.cn>
2009-04-30 7:40 ` Mao Yilu
2009-04-30 7:40 ` Mao Yilu
2009-04-30 14:32 ` Clark Williams
2009-04-30 14:31 ` Henrique de Moraes Holschuh
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=441051630.11976@ustc.edu.cn \
--to=ylmao@mail.ustc.edu.cn \
--cc=hancockrwd@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.