r5194: added support for using epoll instead of select() on systems that have
commit6e0a56f73b7f75e45d97a574cf6fd1fc4f4bff9b
authorAndrew Tridgell <tridge@samba.org>
Thu, 3 Feb 2005 08:24:08 +0000 (3 08:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:30 +0000 (10 13:09 -0500)
tree31713e7463f759b86cc80fa90374ca8f54a2e2ab
parenta097414ed25873cbcbee48f0a888d36a6b60c10c
r5194: added support for using epoll instead of select() on systems that have
it. epoll is much more scalable than select(), but only exists on some
systems (such as Linux with the 2.6.x kernel). The code detects any
epoll system call failures at runtime and falls back to select() if
there is a problem, so it should be safe to compile this on a 2.6
kernel and run it on a 2.4.x kernel.

The speedup is quite large. It gains 20% in packet rate in the
BENCH-NBT test, on top of another 20% gain from the better timer
handling I added earlier. The really big gain will be when we are
dealing with large numbers of file descriptors. With epoll we can
handle hundreds of file descriptors all O(1), whereas with select it
is O(n).
(This used to be commit 26aa1aa69377e43da2942a42d137b95801e9fa1a)
source4/build/m4/rewrite.m4
source4/lib/events.c