Re: Events

From: Andi Kleen (ak@suse.de)
Date: Thu Jun 22 2000 - 19:13:02 EST


On Thu, Jun 22, 2000 at 07:11:38PM -0400, Gyorgy Molnar wrote:
> We made a test system with about 8000 file descriptor. It
> worked fine when we rebuilt the Kernel. The only problem the
> Linux is too good to make this kind of stupid programs.
>
> I've taken a look to the Kernel. And I think we could make a
> new type of file descriptor only for events.

This new kind of file descriptor already exists. It is a real time
signal that carries an integer. You send it with sigqueue() and
receive it via sigwaitinfo() or a a signal handler that has SA_SIGINFO
set. You can use normal file descriptors in the frame work
by associating realtime signals with them use the F_SETSIG fcntl;
then you get a SIGIO like signal for every event on the fd
(see socket(4) for details). That only works properly on network
fds though, async IO support for normal IO is poor.

But anyways, you don't really need it because you can write
longer messages with as much info as you want from multiple threads
into a single pipe (requires on pipe per event loop thread)

-Andi

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



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:25 EST