From owner-freebsd-arch Fri Oct 26 13:15: 9 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by hub.freebsd.org (Postfix) with ESMTP id 7FF7137B405 for ; Fri, 26 Oct 2001 13:15:04 -0700 (PDT) Received: (qmail 64466 invoked from network); 26 Oct 2001 20:15:03 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 26 Oct 2001 20:15:03 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <6790.1004125611@critter.freebsd.dk> Date: Fri, 26 Oct 2001 13:15:01 -0700 (PDT) From: John Baldwin To: Poul-Henning Kamp Subject: Re: 64 bit times revisited.. Cc: arch@FreeBSD.ORG, Peter Wemm , Bakul Shah Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 26-Oct-01 Poul-Henning Kamp wrote: > In message <200110261914.PAA17908@devonshire.cnchost.com>, Bakul Shah writes: > >>> Decimal computers lost the race and they ain't coming back. We want >>> arithmetic on binary computers to be fast and simple. >> >>Most everyone uses powers of ten for timing units. Remember, >>millisecond, microsecond, nanosecond, picosecond?! All test >>equipment time in units of 10s not 2s. That is also why CPUs >>have clock rate in multiples of 10^6 Hzs not 2^20. It is >>just being practical even if division by a power of 10 is a >>bit of a pain. > > If you look in sys/kern/kern_tc.c you can see how much extra > gunk that results in, checking for overruns on the middle part and > whats not. > > There can be no doubt that the best timestamp representation is > pure binary, originating at the second, and that is how my proposal > is constructed: > > <-- 32bit --><-- 32bit --> . <-- 32bit --><-- 32bit --> > 1 2 3 4 IOW, a fixed-point number. This is definitely the optimal solution presented so far for the in-kernel time keeping, IMO. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message