Date: Thu, 03 Jan 2002 21:38:08 -0700 (MST) From: "M. Warner Losh" <imp@village.org> To: silby@silby.com Cc: bde@zeta.org.au, freebsd-arch@FreeBSD.ORG Subject: Re: DELAY accuracy Re: cvs commit: src/sys/dev/usb uhci.c Message-ID: <20020103.213808.117908981.imp@village.org> In-Reply-To: <Pine.BSF.4.30.0201031624120.45843-100000@niwun.pair.com> References: <20020103194429.T15755-100000@gamplex.bde.org> <Pine.BSF.4.30.0201031624120.45843-100000@niwun.pair.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <Pine.BSF.4.30.0201031624120.45843-100000@niwun.pair.com> Mike Silbersack <silby@silby.com> writes: : As for the users of large DELAY values (1000 or greater), I wonder if more : drastic measures should be taken, such as changing such calls to use : tsleep / timeout. It seems like a bad idea to stop the kernel for such : periods of time. (Most of these usages seem to be used during device : startup and error handling cases. While startup probably occurs only : once, I could see how one device driver delaying for a long period of time : due to an underrun/overrun could cause another device to do the same.) We have a routine in our code called tsc_delay (tsc == company name, not pentium counter) that will DELAY if the interrupts aren't running yet (or if the delay is < 1hz), and tsleep if they are. Not universally useful (bad in interrupt handlers :-), but good for some code that has to run either at load time or during the boot process... Warner 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?20020103.213808.117908981.imp>