Date: Wed, 12 Nov 1997 20:12:08 -0800 (PST) From: "Jamil J. Weatherbee" <jamil@trojanhorse.ml.org> To: Peter Dufault <dufault@hda.com> Cc: hackers@FreeBSD.ORG Subject: Re: LabPC+ Driver Specifics Message-ID: <Pine.BSF.3.96.971112195745.778A-100000@trojanhorse.ml.org> In-Reply-To: <199711120055.TAA00327@hda.hda.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971112195745.778A-100000>