aio_connect ?

Christopher M. Sedore cmsedore at maxwell.syr.edu
Wed Oct 20 13:04:29 PDT 2004


 

> From: owner-freebsd-net at freebsd.org 
> [mailto:owner-freebsd-net at freebsd.org] On Behalf Of Igor Sysoev
> Subject: Re: aio_connect ?
> 

[...]

> While the developing my server nginx, I found the POSIX aio_* 
> operations
> uncomfortable. I do not mean a different programming style, I mean
> the aio_read() and aio_write() drawbacks - they have no scatter-gather
> capabilities (aio_readv/aio_writev) and they require too many 
> syscalls.
> E.g, the reading requires
> *) 3 syscalls for ready data: aio_read(), aio_error(), aio_return()
> *) 5 syscalls for non-ready data: aio_read(), aio_error(),
>    waiting for notification, then aio_error(), aio_return(),
>    or if timeout occuired - aio_cancel(), aio_error().
> 

This is why I added aio_waitcomplete().  It reduces both cases to two
syscalls.

-Chris 


More information about the freebsd-net mailing list