Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Dec 1999 03:04:17 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, arch@freebsd.org
Subject:   Re: Threads stuff
Message-ID:  <Pine.BSF.4.10.9912040242440.573-100000@alphplex.bde.org>
In-Reply-To: <99Dec3.095608est.40342@border.alcanet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9912040242440.573-100000>