From owner-freebsd-arch Wed Jan 2 19:34:24 2002 Delivered-To: freebsd-arch@freebsd.org Received: from niwun.pair.com (niwun.pair.com [209.68.2.70]) by hub.freebsd.org (Postfix) with SMTP id 89A8337B416 for ; Wed, 2 Jan 2002 19:34:21 -0800 (PST) Received: (qmail 34844 invoked by uid 3193); 3 Jan 2002 03:34:20 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 3 Jan 2002 03:34:20 -0000 Date: Wed, 2 Jan 2002 22:34:20 -0500 (EST) From: Mike Silbersack X-Sender: To: Subject: DELAY accuracy Re: cvs commit: src/sys/dev/usb uhci.c In-Reply-To: <200201030210.g032AVb19379@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Wed, 2 Jan 2002, Josef Karthauser wrote: > joe 2002/01/02 18:10:31 PST > > Modified files: > sys/dev/usb uhci.c > Log: > Sync with NetBSD: > > * White space changes. > * Updates to comments. > * Replace some delay() calls with usb_delay_ms(). This commit log started me wondering about DELAY usage in the kernel. Looking around, we do have a decent amount of such calls. Most of the calls seem to be for 100 us or less, with some as short a 1 us. These times seem short, but looking at sys/i386/isa/clock.c, I see that we time based off the i8254 timer chip, rather than the processor's TSC. As such, are we actually reaching microsecond accuracy, or is the delay actually taking longer than expected in many of these cases? Thanks, Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message