kevent subsystem

Kevent is a generic subsytem which allows to handle event notifications.
It supports both level and edge triggered events. It is similar to
poll/epoll in some cases, but it is more scalable, it is faster and
allows to work with essentially eny kind of events.

Development status can be tracked here.

Project is closed.

The latest release is 37, release notes can be checked
here.

Another approach for the same idea is eventfs
pseudo FS which allows to bind file descriptors to events and poll them using epoll().

Events are provided into kernel through control syscall and can be read back through userspace ring buffer or syscall. Kevent update (i.e. readiness switching) happens directly from internals of the appropriate state machine of the underlying subsytem (like network, filesystem, timer or any other).

Kevent can be used both for edge and level notifications. It supports socket and pipe notifications (accept, sending and receiving), AIO (aio_sendfile(), aio_sendfile_path()), generic poll()/select() notifications, timer notifications, signal notifications, private userspace notifications, POSIX timers.

LWN published a great article about kevent (second one can be found here, and the latest is here.

There is documentation page at OSDL.org.

Real life benchmark with patched lighttpd server can be found
here. Additional benchmark results ran by Johann Borck (johann.borck_densedata.com) can be found here, here and here.
New benchmark created by Eric Dumazet (dada1_cosmosbay.com) which creates two threads
and set of sockets, which are read/written to by those threads. Here is a results. Here is a results for pipes.
Another probably broken benchmark of ab (Apache benchamrk) against lighttpd with epoll and kevent (more than 7k connections per second on amd64 server) can be found here.

Benchmark and some conclusions about FreeBSD kqueue on the same hardware are available here. Briefly saying, FreeBSD showed much worse behaviour than kevent and even epoll, but it is very likely that I did not complete it’s configuration, since by default FreeBSD does not allow such performance test at all.

libevent kevent patch can be found here. lighttpdlighttpd patch can be found here.
Kevent patch and userspace applications are available in archive.

Kevent has a git repository, one can clone it via http (164 Mb):

$ git clone http://tservice.ru/~s0mbre/archive/kevent/kevent.git/ ./

NAIO – network AIO. More details on the original page.