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 at donpac.ru | PGP key: wwwkeys.pgp.net -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20040830/24c59058/attachment-0001.bin>
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.. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20040906/3486983a/attachment-0001.bin>
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.. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20040906/258690d8/attachment-0001.bin>
Miquel van Smoorenburg
2004-Sep-06 11:00 UTC
[Dovecot] [PATCH] [RFC] epoll based ioloop handler
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.