From owner-freebsd-hackers Wed Nov 12 20:12:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA11162 for hackers-outgoing; Wed, 12 Nov 1997 20:12:30 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from trojanhorse.ml.org (mdean.vip.best.com [206.86.94.101]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id UAA11157 for ; Wed, 12 Nov 1997 20:12:25 -0800 (PST) (envelope-from jamil@trojanhorse.ml.org) Received: from localhost (jamil@localhost) by trojanhorse.ml.org (8.8.8/8.8.5) with SMTP id UAA00794; Wed, 12 Nov 1997 20:12:08 -0800 (PST) Date: Wed, 12 Nov 1997 20:12:08 -0800 (PST) From: "Jamil J. Weatherbee" To: Peter Dufault cc: hackers@FreeBSD.ORG Subject: Re: LabPC+ Driver Specifics In-Reply-To: <199711120055.TAA00327@hda.hda.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Well I throughly investigated doing TAILQ's of bio buffers in the driver, and even started to code it in for aiox. After I realized how much more complicated and seemingly useless (and kind of looked mighty inneffiecient especially in the intr routine which already eats up enough time at full blast as it is) for my purposes since unlike the labpc I have seperate fifos for each of the 128 channels in memory. The inb() --> fifo --> bio buffer in the interrupt routine seemed a little bit of overkill. Since my fifos are 64 entry per channel (I made also a define for the config file "options AIOX_CHANNELS=??) so tha a user with a different length analog multiplexer chain could optimize memory usage, which is 16kb by default. (128channels * 64 shorts) instead i am doing intr: inb() --> fifo --> wakeup and strategy: fifo-> (sleep) --> buffer I'll also put in select() handles for user multiplexing. At 500 microsecond intervals on 128 channels your fifos will overflow in about 4 seconds. I am also implementing AD_STOP and AD_START i think you know what they do by now opening state if same as AD_STOP my fifo overflow mode is to log a console message and throw out the oldest entry. That way in something like a control application (my prime interest) you are never denied the most recent values even after an overflow. I never plan on using more than 48 channels myself but I do have some doubts about any application that would be handling 128 file descriptors, seems kind of evil to me, you?