I understand that Solaris Doors can be used by a driver to have some
work done by a user process; and that the kernel doors API is unofficial
and subject to change. Am I right so far? I'm looking at when this might
be useful, and would welcome confirmation or correction of my thinking.
The traditional UNIX method for upcalls involves having a thread from
the server process asleep in an ioctl; the driver completes the ioctl
when it has something to be done. The ioctl returns to the server
process which does the work and passes the result back in another ioctl,
which then waits for further work to do.
The advantage of the doors mechanism over this appears to be the fast
'shuttle' scheduling back and forth between the calling thread and the
server thread. This should be substantially faster than the normal
thread wakeups involved in the ioctl approach. The costs of crossing the
u/k boundary are the same in both cases. Is this correct? Are there any
other advantages or disadvantages?
It looks like doors would be best where the server is simply providing a
service for the driver. If the user process is just waiting for a driver
event, it looks like the traditional blocking ioctl would be more
efficient - the driver directly completes the ioctl rather than doing a
doors call which wakes a sleeping thread. I suppose the doors approach
might occasionally be useful here if the driver event is just one of
many things that we want a thread to wait for.
Am I thinking correctly here? Any other considerations I'm missing?
Many Thanks,
jjf
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss