From: Manfred Spraul <manfred@colorfullife.com>
To: olonho@hotmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: strange nonmonotonic behavior of gettimeoftheday
Date: Fri, 02 Mar 2001 18:06:05 +0100 [thread overview]
Message-ID: <3A9FD2FD.8D80E684@colorfullife.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
>
> on AMD K6, VIA Technologies VT 82C586, Compaq Presario XL119.
> [snip]
> gives following result on box in question
> root@******:# ./clo
> Leap found: -1687 msec
> and prints nothing on all other my boxes.
Perhaps APM or SMI problems?
Could you run the attached program?
--
Manfred
[-- Attachment #2: ms.c --]
[-- Type: text/plain, Size: 612 bytes --]
#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>
#include <time.h>
static unsigned long long get_tsc(void)
{
unsigned long v1;
unsigned long v2;
__asm__ __volatile__(
"rdtsc\n\t"
: "=a" (v1), "=d" (v2));
return (((unsigned long long)v2)<<32)+v1;
}
int main(int argc, char** argv)
{
unsigned long long t1;
unsigned long long t2;
printf("RDTSC tester\n");
t1 = get_tsc();
for(;;) {
t2 = get_tsc();
if(t1 > t2) {
printf("tsc jumped backwards: from %lld to %lld.\n",
t1, t2);
}
#if 0
printf("diff is %lld-%lld=%d.\n",t2,t1,t2-t1);
#endif
t1 = t2;
}
return 1;
}
next reply other threads:[~2001-03-02 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-02 17:06 Manfred Spraul [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-03-02 22:33 strange nonmonotonic behavior of gettimeoftheday John Being
2001-03-02 5:30 John Being
2001-03-02 15:07 ` Eli Carter
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=3A9FD2FD.8D80E684@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olonho@hotmail.com \
/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.