[CFT] new sendfile(2)
John Baldwin
jhb at freebsd.org
Tue Feb 18 19:15:51 UTC 2014
On Monday, February 17, 2014 6:24:21 am David Chisnall wrote:
> P.S. If aio() is creating a new thread per request, rather than scheduling
them from a pool, then that is also likely a bug. The aio APIs were designed
so that systems with DMA controllers could issue DMA requests in the syscall
and return immediately, then trigger the notification in response to the DMA-
finished interrupt. There shouldn't need to be any kernel threads created to
do this...
AIO uses a pool, but the requests are all done synchronously from that
pool. While our low-level disk routines are async (e.g. GEOM etc.),
the filesystem code above that generally is not. The aio code does have
some special gunk in place for sockets (and I believe raw disk I/O) to
make it truly async, but aio for files uses sychronous I/O from a pool
of worker threads.
--
John Baldwin
More information about the freebsd-current
mailing list