[Dovecot] [PATCH] pass struct io * to io_loop_handle_add()/io_loop_handle_remove()

Andrey Panin pazke at donpac.ru
Tue Aug 24 14:05:27 EEST 2004


On 236, 08 23, 2004 at 05:04:01PM +0300, Timo Sirainen wrote:
> On 23.8.2004, at 15:50, Andrey Panin wrote:
> 
> >Attached patch replaces fd and condition parameters passed to
> >io_loop_handle_add() with struct io pointer. Now io_loop_handle_add()
> >can pass this pointer as user data to epoll_ctl syscall and when
> >event arrives we will have corresponding io structure pointer
> >for free without traversing possibly long ioloop->ios list.
> 
> Committed, but you'd also have to change the way io_destroy() works.

I'm looking at it already.

> I guess it could be simply changed to use reference counting instead of 
> the delayed destroying. Hmm. Looks like ioloop code could use several 
> optimizations..

Reference counting... Hmm, I thinked about replacing ioloop->ios single
linked list with doubly linked list, it should make removal of io entries
easy and loop in the io_add() function can be removed too.

-- 
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/20040824/a093c98b/attachment-0001.bin>


More information about the dovecot mailing list