From owner-freebsd-arch Thu Dec 2 15: 4:37 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 48DFA14C5A for ; Thu, 2 Dec 1999 15:04:30 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id AAA21332 for ; Fri, 3 Dec 1999 00:04:29 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id AAA85986 for freebsd-arch@freebsd.org; Fri, 3 Dec 1999 00:04:28 +0100 (MET) Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id BA22B14FD4 for ; Thu, 2 Dec 1999 15:03:47 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40342>; Fri, 3 Dec 1999 09:56:08 +1100 Content-return: prohibited Date: Fri, 3 Dec 1999 10:03:34 +1100 From: Peter Jeremy Subject: Re: Threads stuff In-reply-to: <819.944166174@critter.freebsd.dk> To: Poul-Henning Kamp Cc: arch@freebsd.org Reply-To: peter.jeremy@alcatel.com.au Message-Id: <99Dec3.095608est.40342@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0pre3i Content-type: text/plain; charset=us-ascii References: <99Dec3.070619est.40333@border.alcanet.com.au> <819.944166174@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 1999-Dec-03 07:22:54 +1100, Poul-Henning Kamp wrote: >In message <99Dec3.070619est.40333@border.alcanet.com.au>, Peter Jeremy writes: >>On my PII-266, clock_gettime(CLOCK_REALTIME) takes 2.48usec and >>gettimeofday() takes 2.42usec - slightly better. >The time it takes depends on the "timecounter" you are using for >your timekeeping. I will venture to guess that the above numbers >come from a UP machine using the TSC. Ooops, I forgot about that. Yes, this is an UP system using the TSC. AFAIK, I can't swap to the 8254 w/o rebooting. I tried the same thing on a P-133 using the i8254 and got: clock_gettime(CLOCK_REALTIME) 6.92 usec gettimeofday() 5.93 usec (And on a 386SX25 running 2.2.5, I got 115usec). >If the timestamps don't need to be more precise than 1/hz, I suspect that for the purposes in question, it _does_ need to be SMP safe (which writes off the TSC) and will need better than 1/hz precision (though I'm not definite about this). Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message