[Dovecot] [PATCH] [RFC] epoll based ioloop handler
Hello,
this patch adds ioloop handler using Linux 2.6 epoll API. I'm not sure is it ready for inclusion right now, but it works for me and survives deadconn test with 1024 simultaneous connections.
Please take a look and comment.
Best regards.
-- Andrey Panin | Linux and UNIX system administrator pazke@donpac.ru | PGP key: wwwkeys.pgp.net
On 30.8.2004, at 16:07, Andrey Panin wrote:
this patch adds ioloop handler using Linux 2.6 epoll API. I'm not sure is it ready for inclusion right now, but it works for me and survives deadconn test with 1024 simultaneous connections.
I made some changes and committed it. I'm not running 2.6 so I'm not sure if I broke it.
- Removed count from struct io_list. Uses less memory.
- Don't use epoll unless --with-ioloop=epoll is given. Alternative would be to check at runtime if epoll is supported by kernel. I'm not sure if it's worth the trouble..
On 30.8.2004, at 16:07, Andrey Panin wrote:
this patch adds ioloop handler using Linux 2.6 epoll API. I'm not sure is it ready for inclusion right now, but it works for me and survives deadconn test with 1024 simultaneous connections.
Hmm. epoll requires that everything is read from the fd or it doesn't send another notification. I'm not sure if everything in Dovecot works this way. All the I/O handlers should be checked and fixed..
On 2004.09.06 00:22, Timo Sirainen wrote:
On 30.8.2004, at 16:07, Andrey Panin wrote:
this patch adds ioloop handler using Linux 2.6 epoll API. I'm not sure is it ready for inclusion right now, but it works for me and survives deadconn test with 1024 simultaneous connections.
Hmm. epoll requires that everything is read from the fd or it doesn't send another notification. I'm not sure if everything in Dovecot works this way. All the I/O handlers should be checked and fixed..
The mailinglist archive doesn't seem to have archived the patch, so I can't check, but what you write above is only true when using EPOLLET (edge triggered). When using epoll as a drop-in replacement for poll() or select() you probably simply shouldn't use EPOLLET.
Mike.
On 6.9.2004, at 14:00, Miquel van Smoorenburg wrote:
Hmm. epoll requires that everything is read from the fd or it doesn't send another notification. I'm not sure if everything in Dovecot works this way. All the I/O handlers should be checked and fixed..
The mailinglist archive doesn't seem to have archived the patch, so I can't check, but what you write above is only true when using EPOLLET (edge triggered). When using epoll as a drop-in replacement for poll() or select() you probably simply shouldn't use EPOLLET.
Ok, I should have read epoll man pages too. I just happened to read "the c10k problem" web page where it said epoll being only edge-triggered.
participants (3)
-
Andrey Panin
-
Miquel van Smoorenburg
-
Timo Sirainen