I find myself on the horns of a dilemma: to find the "right way to do it".
I have a cloneable STREAMS driver for a network adaptor, which demultiplexes
incoming data based on a channel id onto several streams. Doing the demulti-
plexing in the interrupt routine seems costly. The thread has to do a search
operation, to aquire locks. I'd like to let the interrupt routine run through
without blocking (if possible). One way is to simply enqueue the data tagged
with the channel id onto a queue (attached to the physical instance/unit) and
have a separate service routine do the demultiplexing and further processing.
The classical way to do it, is to have your own queue structure and to fire
a software interrupt procedure. But isn't STREAMS supposed to do this ?
Yes and no. It is possible to have the read side queue and service
routine running. But this is per-software instance (stream), not per-hardware
instance (adaptor), thus I'd still have the multiplexing in the interrupt
routine. Is it possible to use the muxrinit structure for such a purpose ?
Will this be still DDI/DKI compliant ? Any other elegant solutions ?
Yet another question: does anybody have a pointer to a good paper about
locking strategies ? A good locking scheme seems to be the key for good
performance of a Solaris driver.
Thanks for any help.
GMD German National Research Corporation for Mathematics and
FOKUS Data Processing - Research Institute for Open Communication Systems