Re: Asynchronous sock_sendmbuf
Re: Asynchronous sock_sendmbuf
- Subject: Re: Asynchronous sock_sendmbuf
- From: Terry Lambert <email@hidden>
- Date: Wed, 21 May 2008 16:30:57 -0700
On May 21, 2008, at 3:30 AM, Igor Mikushkin wrote:
Network Kernel Extensions Programming Guide says here:
If your code is in a performance-critical part of the kernel (as
opposed to a call from user space), you should generally perform
socket I/O asynchronously.
This is to prevent you from blocking on a write, and having everything
pile up behind you waiting for you. For example, if your KEXT is a
block device driver that does network based logging, then blocking on
logging is going to prevent anything talking to your block device
driver from talking to the media while you are busy waiting for the
logging to occur.
It's perfectly reasonable to marshall the I/O off to another thread,
and have it make a blocking call on your behalf, so long as you don't
depend on the call having been made for subsequent operations to be
successful
-
Maybe we can step back a second...
What are you trying to accomplish here that you think getting an
upcall would accomplish for you?
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden