Date: Thu, 21 Oct 2004 00:27:52 +0400 (MSD) From: Igor Sysoev <is@rambler-co.ru> To: "Christopher M. Sedore" <cmsedore@maxwell.syr.edu> Cc: "Ronald F. Guilmette" <rfg@monkeys.com> Subject: RE: aio_connect ? Message-ID: <20041021001251.G17688@is.park.rambler.ru> In-Reply-To: <32A8B2CB12BFC84D8D11D872C787AA9A058EE90F@EXCHANGE.forest.maxwell.syr.edu> References: <32A8B2CB12BFC84D8D11D872C787AA9A058EE90F@EXCHANGE.forest.maxwell.syr.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 20 Oct 2004, Christopher M. Sedore wrote: > > 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. As I understand aio_waitcomplete() returns aiocb of any complete AIO operation but I need to know the state of the exact AIO, namely the last aio_read(). I use kqueue to get AIO notifications. If AIO operation would fail at the start, will kqueue return notificaiton about this operation ? Igor Sysoev http://sysoev.ru/en/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041021001251.G17688>