How to provide Async IO support in a driver



  • 1. DTrace probes before boot?
    I've seen numerous references (the latest from Casper, I think) stating that one can start DTrace probes before boot. My questions are then (1) how? and (2) in what (legitimate) cases might one have a need to do that? Of course, I have my own reasons for the sake of academic curiousity, but we'll not discuss that here ;) Is it as simple as writing an SMF service that starts way bloody early and runs a dtrace script? -- Coy Hile XXXX@XXXXX.COM
  • 2. ALOM; License for Test Server
    Can ALOM v1.5 be installed on a 280R? Does Sun require an additional license for a test server? I am considering a used box for a test server which comes w/o a license or any software. TIA, Tim
  • 3. X and SMC daemon not running
    Hi, I've just installed Solaris 10 03/05 on an old Ultra 10. When it comes up, it only has command line login. I can get a graphic login by logging as root and running gdm, but it would be nice if it did it automatically. To this end I logged in graphically, and ran smc (I wasn't sure if I could set up X as a service from within SMC - probably can't) but then it said that there was not an SMC daemon running on that machine. At that point I decided to make sure it was in the right run level. Unlike Linux there does not appear to be a run level for multiuser + X, so I tried init 3, which didn't change anything. I'm fairly sure I'm gonna have to do something using the hideous svcadm command, but I'm not sure what. Has anyone got any ideas on what is wrong? Thanks, Paul ~~~~~
  • 4. SUN servers useage
    HI, what i want to know is Most of the Business sector using SUN servers for what purpose ? to host databases or mail servers or any other
  • 5. No monitor output
    Not sure what happened ... but our test E220R server no longer outputs to the monitor. After forcing the machine to do go to firmware more ( init 0 ) from an ssh shell, and the monitor attached to the PCI card... The only thing that gets displayed on the monitor is something like: No keyboard present. Sending output via /dev/ttya .. whereas before, I can get monitor output. Is there a way to force it to output on both serial A and monitor at the same time ? I thought it does by default ?? Also, the keyboard does not seem to be working anymore. If I plugin the keyboard while the E220R is powered up, I get a beep from the E220R. Recyclying it also does not recognise the keyboard. Any ideas ?

How to provide Async IO support in a driver

Postby Michael Dalpee » Tue, 10 Feb 2004 01:59:09 GMT


I am having trouble getting the aio_read and aio_suspend calls to work
properly with a driver we have written to do DMA transfers via the PCI bus.
I do not know if the driver is properly configured to enable the async
xxxaread cb_ops function.  I have searched high and low and cannot find
anything written on this topic.  Does anyone know under what conditions the
xxxaread cb_ops function is called?  In tracing my drivers activity, even
though I call aio_read from the user process, the xxxread cb_ops is always
called by the kernel.  Although I am able to start the DMA, I am having
trouble getting biodone to properly notify the user process, particularly
when it is called from a timeout routine.

I am running Solaris 8/9.  Any information on how to properly write drivers
that support async io or how to properly time out DMA completion would be
greatly appreciated.



Re: How to provide Async IO support in a driver

Postby Phil Brown » Wed, 11 Feb 2004 16:45:30 GMT

"what calls it" is basically not your problem, as long as you follow the
sun docs on how to do it.


 return (aphysio(yourstrategyfunc, anocancel, dev, B_READ,

in your aread(9e) function, and that's the end of the story.
just make sure your strategy function works properly

ah.. well "properly" is in the eye of the beholder. cant help you there.
But you dont have to worry specifically about the AIO stuff, as long as
you do the above, I think.

Return to unix


Who is online

Users browsing this forum: No registered users and 88 guest