From owner-freebsd-arch Thu Jan 3 13:51:20 2002 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 5641F37B419 for ; Thu, 3 Jan 2002 13:51:17 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id g03LmoY02973; Thu, 3 Jan 2002 22:48:50 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Mike Silbersack Cc: Bruce Evans , freebsd-arch@FreeBSD.ORG Subject: Re: DELAY accuracy Re: cvs commit: src/sys/dev/usb uhci.c In-Reply-To: Your message of "Thu, 03 Jan 2002 16:35:40 EST." Date: Thu, 03 Jan 2002 22:48:50 +0100 Message-ID: <2971.1010094530@critter.freebsd.dk> From: Poul-Henning Kamp 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 In message , Mike Silb ersack writes: >I'm not actually concerned about DELAY() calls being accurate for the sake >of the device drivers using such calls, but rather for the sake of rest of >the OS; if a call to DELAY(1) in some commonly called interrupt handler is >really taking 8us, that's 7us of extra interrupt latency that we could >save. If we look at DELAY(1), which is a very common value, considering the typical use, I suspect it may actually be specified not for the delay as much for various "things to happen", things which might be better provoked by memory barriers or similar. Either way, in i386 I think DELAY(1) would be best implemented as inb(0x80) Arguments for DELAY of 1msec and higher should be converted to tsleep() + HZ=1000. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message