Date: Fri, 4 Jan 2002 09:53:52 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Mike Silbersack <silby@silby.com>, <freebsd-arch@FreeBSD.ORG> Subject: Re: DELAY accuracy Re: cvs commit: src/sys/dev/usb uhci.c Message-ID: <20020104094951.K18194-100000@gamplex.bde.org> In-Reply-To: <831.1010050137@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020104094951.K18194-100000>