From owner-freebsd-hackers Sat Nov 1 19:34:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA25268 for hackers-outgoing; Sat, 1 Nov 1997 19:34:51 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from sendero-ppp.i-connect.net (sendero-ppp.i-Connect.Net [206.190.143.100]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id TAA25259 for ; Sat, 1 Nov 1997 19:34:45 -0800 (PST) (envelope-from shimon@sendero-ppp.i-connect.net) Received: (qmail 21615 invoked by uid 1000); 2 Nov 1997 03:35:14 -0000 Message-ID: X-Mailer: XFMail 1.2-beta-103097 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199711020252.NAA00521@word.smith.net.au> Date: Sat, 01 Nov 1997 19:35:14 -0800 (PST) Organization: Atlas Telecom From: Simon Shapiro To: Mike Smith Subject: Re: Strategy Routines Cc: hackers@FreeBSD.ORG, dufault@hda.com, "Jamil J.Weatherbee" Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi Mike Smith; On 02-Nov-97 you wrote: > > > > period. Now I know that if the drivers routine can be interrupt driven > > the this is all solved, but if (as in digital_out_strategy() in > > labpc.c) > > someone passes a 1/2 megabyte buffer, youv'e got a problem as your > > going > > to be out of business for at least .5 seconds. So how can the > > equivalent > > of reschedule() under the linux kernel be done in here. You could then > > limit yourself (in the drivers) to say 1024 bytes written then a > > reschedule() to maintain the interactivity. > > This is a fault in the driver design. Drivers should not hog the > cpu, obviously. Try calling tsleep() out of the driver with a very > short timeout. Another thing to try is soft interrupts; Setup the copy, shcedule software insterrupt. The software interrupt routine gets control, copies a chunk, does the bookkeeping. If not done, schedules another interrupt and returns. I think it has lower overhead than tslepp and the added advantage that it will not panic if called outside a user context. --- If Microsoft Built Cars: Every time they repainted the lines on the road, you'd have to buy a new car. Sincerely Yours, Simon Shapiro Atlas Telecom Senior Architect 14355 SW Allen Blvd., Suite 130 Beaverton OR 97005 Shimon@i-Connect.Net Voice: 503.799.2313