Messages in this thread | | | From | "Stephen C. Tweedie" <> | Date | Wed, 15 Sep 1999 01:13:22 +0100 (BST) | Subject | Re: POSIX aio vs completion ports |
| |
Hi,
On Sat, 11 Sep 1999 21:26:47 -0700, John Gardiner Myers <jgmyers@netscape.com> said:
> Alan Cox wrote: >> POSIX real time signal queues are effectively completion ports.
> You must not have understood the post you were replying to. POSIX real > time signal queues are inferior to completion ports in many ways.
> * As far as I know, there is no way to allocate a POSIX real time signal > number in a thread safe manner. There is no equivalent to the socket() > system call--one must just pick a number and hope that no other thread > in the same process just picked the same number.
As far as I know, completion ports still have the demultiplexing done in a single place, so in that model you still have to have extra explicit application/library cooperation to let libraries share queues.
> * Chuck Lever informs me that the signal queue might overflow, leading > to lost completion notifications. There is no reasonable way for an > application to recover from such a condition.
There is. The existing kernel supports sending a separate, higher priority event to notify the application of overflow, and poll is a sufficient recovery mechanism. You don't expect overflow to be a common, performance-critical case.
> * POSIX aio lacks a mechanism to request read polls.
Who is talking about POSIX aio? That is a totally different API. For the purposes in question --- networking IO --- leave POSIX aio well alone, Unix O_NONBLOCK plus completion events is a perfectly adequate API. The async IO API is not necessary or desirable.
> * POSIX aio lacks asynchronous versions of writev() and sendfile(). > (Though the lack of an aio_writev() is made less important by > TCP_CORK.)
See the previous point: you'd be crazy to want aio_writev on a socket.
--Stephen
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |