diff options
author | root <root> | 2008-10-27 12:20:32 +0000 |
---|---|---|
committer | root <root> | 2008-10-27 12:20:32 +0000 |
commit | 4202379741bd075fe5e64e737793ef94e432ef99 (patch) | |
tree | ffee458795c4a6295a7baf7333a3b4a40c9ad682 | |
parent | ed3f7d82632357b7ba925cb742cd9ef61ceed26d (diff) |
*** empty log message ***
-rw-r--r-- | ev.pod | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -386,17 +386,20 @@ C<EV_WRITE> to C<POLLOUT | POLLERR | POLLHUP>. For few fds, this backend is a bit little slower than poll and select, but it scales phenomenally better. While poll and select usually scale like O(total_fds) where n is the total number of fds (or the highest fd), -epoll scales either O(1) or O(active_fds). The epoll design has a number -of shortcomings, such as silently dropping events in some hard-to-detect -cases and requiring a system call per fd change, no fork support and bad -support for dup. +epoll scales either O(1) or O(active_fds). + +The epoll syscalls are the most misdesigned of the more advanced +event mechanisms: probelsm include silently dropping events in some +hard-to-detect cases, requiring a system call per fd change, no fork +support, problems with dup and so on. Epoll is also notoriously buggy - embedding epoll fds should work, but of course doesn't, and epoll just loves to report events for totally -I<different> file descriptors (even already closed ones) than registered -in the set (especially on SMP systems). Libev tries to counter these -spurious notifications by employing an additional generation counter and -comparing that against the events to filter out spurious ones. +I<different> file descriptors (even already closed ones, so one cannot +even remove them from the set) than registered in the set (especially +on SMP systems). Libev tries to counter these spurious notifications by +employing an additional generation counter and comparing that against the +events to filter out spurious ones. While stopping, setting and starting an I/O watcher in the same iteration will result in some caching, there is still a system call per such incident |