From owner-freebsd-current Fri Aug 23 15:59:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA1C837B400 for ; Fri, 23 Aug 2002 15:59:07 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD95B43E3B for ; Fri, 23 Aug 2002 15:59:07 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 970A32A7D6; Fri, 23 Aug 2002 15:59:07 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Poul-Henning Kamp Cc: John Polstra , current@freebsd.org Subject: Re: how to compute the skew between TSC in SMP systems ? In-Reply-To: <30293.1030137693@critter.freebsd.dk> Date: Fri, 23 Aug 2002 15:59:07 -0700 From: Peter Wemm Message-Id: <20020823225907.970A32A7D6@canning.wemm.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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