On Mon, Apr 19, 2010 at 01:26:33AM +0200, Marc Lehmann <[email protected]>
wrote:
> Sorry, forgot to mention that this can easily explain the perceived
> performance, as libev does EPOLL_CTL_MOD, while libevent does
> EPOLL_CTL_ADD, which is faster in the benchmark case (it simply errors out
> without writing memory), but does not support fork.
If anybody who can actually benchmark this (I still can't), you can get the
same effect by replacing:
if (expect_true (!epoll_ctl (backend_fd, oev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD,
fd, &ev)))
with:
if (expect_true (!epoll_ctl (backend_fd, oev && oev != nev ? EPOLL_CTL_MOD :
EPOLL_CTL_ADD, fd, &ev)))
in ev_epoll.c.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / [email protected]
-=====/_/_//_/\_,_/ /_/\_\
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev