From owner-freebsd-arch Fri Dec 3 8: 6: 8 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 CD0B0151BE for ; Fri, 3 Dec 1999 08:06:02 -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 RAA08053 for ; Fri, 3 Dec 1999 17:05:42 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id RAA89757 for freebsd-arch@freebsd.org; Fri, 3 Dec 1999 17:05:42 +0100 (MET) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 6C9EF151BE for ; Fri, 3 Dec 1999 08:04:41 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id DAA16013; Sat, 4 Dec 1999 03:10:49 +1100 Date: Sat, 4 Dec 1999 03:04:17 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Peter Jeremy Cc: Poul-Henning Kamp , arch@freebsd.org Subject: Re: Threads stuff In-Reply-To: <99Dec3.095608est.40342@border.alcanet.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 3 Dec 1999, Peter Jeremy wrote: > 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. In -current, you can use sysctl -w kern.timecounter.hardware=i8254 sysctl -w kern.timecounter.hardware=TSC > 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 That's surprisingly large. The difference is probably mainly due to different L1/L2 cache lossage. > (And on a 386SX25 running 2.2.5, I got 115usec). Heh. Some historical benchmarks for differences between successive calls to gettimeofday(): ==> /home/bde/current/var/microtime/go.cel-450 <== 1999/05/02: min 1, max 44, mean 1.683213, std 0.501948 1th: 2 (1359226 observations) 2th: 1 (639961 observations) 3th: 10 (286 observations) 4th: 11 (123 observations) 5th: 7 (116 observations) ==> /home/bde/current/var/microtime/go.cel-458 <== 1999/12/04: min 1, max 29, mean 1.498473, std 0.523034 1th: 1 (1008000 observations) 2th: 2 (991299 observations) 3th: 9 (253 observations) 4th: 10 (144 observations) 5th: 6 (106 observations) ==> /home/bde/current/var/microtime/go.dx2-66 <== 1995/11/03: min 13, max 171, mean 14.286634, std 1.836667 1th: 14 (1053245 observations) 2th: 15 (587593 observations) 3th: 13 (299847 observations) 4th: 16 (51817 observations) 5th: 33 (934 observations) ==> /home/bde/current/var/microtime/go.k6-233 <== 1998/02/21: min 2, max 124, mean 2.240976, std 0.617886 1th: 2 (1535123 observations) 2th: 3 (463782 observations) 3th: 18 (302 observations) 4th: 17 (234 observations) 5th: 19 (107 observations) ==> /home/bde/current/var/microtime/go.p5-133 <== 1996/07/12: min 3, max 472, mean 3.320346, std 0.694846 1th: 3 (1376420 observations) 2th: 4 (621949 observations) 3th: 12 (594 observations) 4th: 13 (281 observations) 5th: 11 (233 observations) 1998/02/21 pre-timecounter: min 3, max 595, mean 3.443382, std 0.767383 1th: 3 (1134768 observations) 2th: 4 (863276 observations) 3th: 15 (719 observations) 4th: 5 (299 observations) 5th: 16 (263 observations) 1998/02/21 post-timecounter: min 4, max 99, mean 4.614527, std 0.710407 1th: 5 (1195577 observations) 2th: 4 (801694 observations) 3th: 16 (707 observations) 4th: 6 (456 observations) 5th: 17 (420 observations) 1999/12/04: min 4, max 120, mean 4.630231, std 0.777733 1th: 5 (1222295 observations) 2th: 4 (775244 observations) 3th: 18 (444 observations) 4th: 19 (441 observations) 5th: 21 (250 observations) All except the dx2-66 used the TSC. We still haven't revovered the pre-timecounter performance. My current kernel has extra overheads to implement some monotonicity. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message