Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2002 15:59:07 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        John Polstra <jdp@polstra.com>, current@freebsd.org
Subject:   Re: how to compute the skew between TSC in SMP systems ? 
Message-ID:  <20020823225907.970A32A7D6@canning.wemm.org>
In-Reply-To: <30293.1030137693@critter.freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> In message <200208232114.g7NLE80E087984@vashon.polstra.com>, John Polstra wri
    te
> s:
> >In article <29486.1030136549@critter.freebsd.dk>,
> >Poul-Henning Kamp  <phk@critter.freebsd.dk> wrote:
> >> In message <20020823134410.A81962@iguana.icir.org>, Luigi Rizzo writes:
> >
> >> >does anyone have an idea on how to determine the skew between
> >> >TSC content in the various processors on an SMP box ?
> >> 
> >> On i386: It cannot be reliably done.  Been there, tried that.
> >
> >Well ... you can come pretty close.  The BSD/OS kernel has code
> >(conditioned on option SMP_DEBUG) that manages to sync up all TSCs in
> >an N-CPU system such that the measured difference between the extremes
> >is less than 100 counts.
> 
> Was this before or after APM, ACPI, SpeedStep and all the other
> crap ruined the TSC as a timecounting device ?

For what its worth, Linux does this.  Remember, SMP boxes usually dont have
the same power reduction crud.  And the pentium4 with the auto-throttling
has extra magic to make the TSC run at a constant speed.

Of course, this assumes the clocks are running at the same speed.  I have a
machine at work that has one 800MHz cpu and one 933MHz cpu.  Both are running
at 133MHz FSB but with different internal multipliers.

And then there's the machine with a 233MHz cpu and a 1.4GHz cpu... But lets
not go into that one. :-)

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020823225907.970A32A7D6>