From owner-freebsd-arch Thu Jan 3 14:53:37 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 69A9237B405 for ; Thu, 3 Jan 2002 14:53:34 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id JAA04543; Fri, 4 Jan 2002 09:53:27 +1100 Date: Fri, 4 Jan 2002 09:53:52 +1100 (EST) From: Bruce Evans X-X-Sender: To: Poul-Henning Kamp Cc: Mike Silbersack , Subject: Re: DELAY accuracy Re: cvs commit: src/sys/dev/usb uhci.c In-Reply-To: <831.1010050137@critter.freebsd.dk> Message-ID: <20020104094951.K18194-100000@gamplex.bde.org> 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 Thu, 3 Jan 2002, Poul-Henning Kamp wrote: > I agree that code shouldn't depend too much on the accuracy of DELAY() > but on the other hand I think we can do much better than we do today. > > Obviously, nanosleep() will need a MD part for short delays, but long > delays can be handled MI in timecounter land, since the timecounters > have already hold of the hardware. > > On the other hand, nanosleep() would mostly be for very short intervals, > and the changes that for instance the TSC might experience are minor > compared to the interval. > > Summary: > a) A lot more can be done to improve things. > b) Not doing so properly discourages people from using it. It is usually a mistake to use it, so nothing (apart from deleting it) should be done to improve it. The same hardware speedups that allow DELAY(1) to be implemented relatively accurately have made 1 usec a relatively long time. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message