From owner-freebsd-bugs Wed Mar 8 08:41:10 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id IAA18812 for bugs-outgoing; Wed, 8 Mar 1995 08:41:10 -0800 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id IAA18806 for ; Wed, 8 Mar 1995 08:41:08 -0800 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA00803; Wed, 8 Mar 95 09:33:49 MST From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9503081633.AA00803@cs.weber.edu> Subject: Re: QIC-80 problem To: bde@zeta.org.au (Bruce Evans) Date: Wed, 8 Mar 95 9:33:49 MST Cc: freebsd-bugs@FreeBSD.org In-Reply-To: <199503080113.LAA30812@godzilla.zeta.org.au> from "Bruce Evans" at Mar 8, 95 11:13:17 am X-Mailer: ELM [version 2.4dev PL52] Sender: bugs-owner@FreeBSD.org Precedence: bulk > I recently noticed that the standard timer code doesn't guarantee any > upper bounds for timeouts. softclock() runs at a lower priority than > all hardware interrupts. It is possible for a fast device on a slow > interface to keep the system busy handling interrupts so that > softclock() never runs. A fast EIDE drive using the old IDE interface > can probably do this (unless the system isn't programmed well enough to > keep the data streaming :-]). > > The one shot timer would have to be handled at a higher priority than > softclock() or its resolution would be lost. It wouldn't necessarily > work to use the same priority as the device that requested the timeout. > The ft priority would have to be higher than the wd priority to avoid > the above problem. This would require large reorganizations because > the ft priority and the wd priority are currently identical (bio). Right; putting the timer at a high priority is one of the things which is needed. Putting the floppy at nearly the highest priority is only logical, given that it has no buffers. A good example of "the right" priority levels is available by examining the SMP SCO Xenix (Corrollary version). Basically, any interface that doesn't have buffers on its I/O should be higher priority that any interface that does. I'd be tempted to put the floppy at just below the timer priority itself, and multithread things at a real low granularity -- ideally the buzz-loops in device drivers should be timer scheduled events, and any other approach to scheduling will have either everything running at the timer priority or will require helper processes like "update" to make things work. A real gross hack. When you consider wd vs ft/fd priority, you also need to consider that much of the I/O wait in the user program is reading from, for instance, the wd (or some other disk driver) to do the tape write in the first place. Unfortunately, I don't know of a software method of detecting the most offensive wd interface, an IDE without buffer chips on it... the only thing I can thing of is trying to run BSD and having it fail on you. 8-). The first thing one should do, probably, is to get the floppy tape reliability divorced from the need for a program in user space to get its quantum for it to be able to operate correctly, or any time anyone hits 90%+ on system load the thing is going to fail for sure. Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.