Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Oct 2004 16:04:27 -0400
From:      "Christopher M. Sedore" <cmsedore@maxwell.syr.edu>
To:        "Igor Sysoev" <is@rambler-co.ru>, "Ronald F. Guilmette" <rfg@monkeys.com>
Cc:        freebsd-net@freebsd.org
Subject:   RE: aio_connect ?
Message-ID:  <32A8B2CB12BFC84D8D11D872C787AA9A058EE90F@EXCHANGE.forest.maxwell.syr.edu>

next in thread | raw e-mail | index | archive | help
=20

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

[...]

> While the developing my server nginx, I found the POSIX aio_*=20
> 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=20
> 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().
>=20

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

-Chris=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?32A8B2CB12BFC84D8D11D872C787AA9A058EE90F>