kqueue, kevent - kernel event notification mechanism

Carlo Wood (carlo@alinoe.com)
Thu, 6 Dec 2001 01:38:57 +0100


Hiya,

are there any plans to implement the kqueue, kevent system calls
in the linux kernel?

There is no substitute for them currently; select() and poll()
both suffer from dramatic cpu usage when a daemon is loaded with
a few thousand clients.

It would be good for linux to implement event-driven i/o, if not
by means of kqueue/kevent (BSD-ish interface) then at least in
some other way.

It has been shown that a heavily loaded networking daemon like
an IRC daemon uses 35% less cpu on freeBSD by using event-driven
i/o instead of poll().

For those who are not into this material, allow me to explain
the difference. The current i/o calls, select and poll, scan all
open file descriptors for events, every call. This is clearly
not scalable. Event driven means that the kernel never scans
all open file descriptors but queues events as they happen on
the network card - the latter would in principle be scalable
to any number of open file descriptors, as long as there is
enough memory and as long as there is a limited number of
file descriptors active per time unit.

-- 
Carlo Wood <carlo@alinoe.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/