Menu

#60 epoll_reactor could cause unnecessary wakeups

open
nobody
None
5
2012-02-27
2012-02-27
jinmei
No

I've noticed that the epoll reactor is not very efficient.
In epoll_reactor::start_op(), it registers both EPOLLIN and EPOLLOUT
(with some others) regardless of the required operation. Also, it
doesn't explicitly delete registered events when they are not
necessary. Since a socket is generally writable quite often,
epoll_wait() could return events that no one actually requested to
notify. I actually confirmed that such unnecessary wakeups can happen
via some test code.

It doesn't seem to be very difficult to fix it; the same approach
as kqueue_reactor seems to be applicable. Is there any plan to
address this issue either that way or another, or would it be possibly
accepted if I submitted a patch?

I've tested it with ASIO 1.4.8, but from a browse of the code 1.5.x
still seems to have the same issue.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB