From owner-cvs-all Mon Nov 30 10:06:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA21513 for cvs-all-outgoing; Mon, 30 Nov 1998 10:06:20 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA21505; Mon, 30 Nov 1998 10:06:19 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.1/8.9.1) id KAA00788; Mon, 30 Nov 1998 10:05:41 -0800 (PST) (envelope-from dillon) Date: Mon, 30 Nov 1998 10:05:41 -0800 (PST) From: Matthew Dillon Message-Id: <199811301805.KAA00788@apollo.backplane.com> To: Peter Wemm Cc: Poul-Henning Kamp , Mike Smith , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_clock.c References: <199811301508.XAA11566@spinner.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Someone tell me if I'm missing something here: Why aren't we simply scaling (at least for the higher-end cpu's) the 64 bit cycle counter register? It seems simple enough to me. It's frequency needs to be calculated but it should be reasonably stable once that is done and there are *no* overflow problems. That is, use the standard timer interrupt to generate hardclocks, but base all time operations off the scaled 64 bit cycle counter for cpu's that support it. We would *not* use the 82C54's timer registers to actually try to read out the counter at all unless we were running on much older cpu's. If we dynamically scale the 64 bit counter down to 32 bits and guarentee a scaling factor that guarentees us at least 1 hour @ 32 bits before rollover, we still have a resolution of 0.838 uS (or, at worse using a power-of-2 scaling, 1.6 uS). Seems dandy to me! -Matt Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet Communications & God knows what else. (Please include original email in any response) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message