Re: /dev/poll vs. aio_ (was: Re: Proposal: Get rid of most accept

Stephen C. Tweedie (sct@redhat.com)
Tue, 1 Jun 1999 23:27:49 +0100 (BST)


Hi,

On Mon, 31 May 1999 13:13:57 -0400 (EDT), Zach Brown <zab@zabbo.net>
said:

> I only went down this sigio/siginfo road because experiments with thttpd
> were showing that select was only returning one or two fds on average..
> instead of using an expensive select()/walk fds to find work, we just have
> sigio drop them in the ring when they happen.

Remember that you don't actually need the overhead of a ring buffer,
because the kernel gives you one for free. If you use sigwaitinfo(),
you can pop the next signal off the queue at any time, without ever
enabling signal delivery and without the synchronisation costs of having
to deal with asynchronous signal handlers. To keep the queue size under
control you can pop the entire kernel queued signal stack onto your work
queue every time you go round the loop. You still never need to take a
signal delivery (except for the catch-all overflow sigio).

--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/